Skip to content

Commit

Permalink
Download and unzip to temp folder and not $HOME
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhnroyal committed Feb 3, 2022
1 parent d5878a0 commit 36e70a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions setup.sh
Expand Up @@ -48,14 +48,14 @@ get_version_manifest() {
download_archive() {
archive_url="$MANIFEST_BASE_URL/$1"
archive_name=$(basename $1)
archive_local="$HOME/$archive_name"
archive_local="$RUNNER_TEMP/$archive_name"

curl --connect-timeout 15 --retry 5 $archive_url >$archive_local

if [[ $archive_name == *zip ]]; then
unzip -q -o "$archive_local" -d "$HOME"
unzip -q -o "$archive_local" -d "$RUNNER_TEMP"
shopt -s dotglob
mv ${HOME}/flutter/* "$2"
mv ${RUNNER_TEMP}/flutter/* "$2"
shopt -u dotglob
else
tar xf "$archive_local" -C "$2" --strip-components=1
Expand Down

0 comments on commit 36e70a6

Please sign in to comment.