mirror of
https://github.com/subosito/flutter-action.git
synced 2024-08-16 10:19:50 +02:00
Merge pull request #132 from kuhnroyal/temp-folder
Download and unzip to temp folder and not $HOME
This commit is contained in:
commit
77740fc108
1 changed files with 3 additions and 3 deletions
6
setup.sh
6
setup.sh
|
@ -48,14 +48,14 @@ get_version_manifest() {
|
||||||
download_archive() {
|
download_archive() {
|
||||||
archive_url="$MANIFEST_BASE_URL/$1"
|
archive_url="$MANIFEST_BASE_URL/$1"
|
||||||
archive_name=$(basename $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
|
curl --connect-timeout 15 --retry 5 $archive_url >$archive_local
|
||||||
|
|
||||||
if [[ $archive_name == *zip ]]; then
|
if [[ $archive_name == *zip ]]; then
|
||||||
unzip -q -o "$archive_local" -d "$HOME"
|
unzip -q -o "$archive_local" -d "$RUNNER_TEMP"
|
||||||
shopt -s dotglob
|
shopt -s dotglob
|
||||||
mv ${HOME}/flutter/* "$2"
|
mv ${RUNNER_TEMP}/flutter/* "$2"
|
||||||
shopt -u dotglob
|
shopt -u dotglob
|
||||||
else
|
else
|
||||||
tar xf "$archive_local" -C "$2" --strip-components=1
|
tar xf "$archive_local" -C "$2" --strip-components=1
|
||||||
|
|
Loading…
Reference in a new issue