Skip to content

Commit

Permalink
fixes asdf-community#33: install from zip files
Browse files Browse the repository at this point in the history
  • Loading branch information
bmatcuk authored and hleinone committed Jun 30, 2024
1 parent d7ae5ad commit b54b3d4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bin/install
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,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}"
}

Expand Down

0 comments on commit b54b3d4

Please sign in to comment.