diff --git a/bin/install b/bin/install index b82e6c8..924ba1e 100755 --- a/bin/install +++ b/bin/install @@ -43,7 +43,13 @@ install() { mkdir -p "${ASDF_INSTALL_PATH}" cd "${ASDF_INSTALL_PATH}" || exit 1 curl -OJL "${url}" - tar xf "${fileName}" --strip 1 + if [ "${fileName##*.}" == "zip" ]; then + local tmpdir="$(mktemp -d)" + unzip -d "${tmpdir}" "${fileName}" + mv "${tmpdir}/flutter"/* "${ASDF_INSTALL_PATH}/" + else + tar xf "${fileName}" --strip 1 + fi rm -f "${fileName}" }