Skip to content

Commit

Permalink
installer: use temporary download (#784)
Browse files Browse the repository at this point in the history
Signed-off-by: Elan Ruusamäe <glen@pld-linux.org>
  • Loading branch information
glensc committed Mar 27, 2020
1 parent e03bf7b commit 2e3cfdb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scripts/get-okteto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,13 @@ if [ ! -w "$install_dir" ]; then
fi
fi

printf "> Downloading $URL\n"
download_path=$(mktemp)
curl -fSL "$URL" -o "$download_path"
chmod +x "$download_path"

printf "> Installing $install_path\n"
$sh_c "rm -f $install_path"
$sh_c "curl -fSL $URL -o $install_path"
$sh_c "chmod +x $install_path"
$sh_c "mv -f $download_path $install_path"

printf "$green> Okteto successfully installed!\n$reset"

Expand Down

0 comments on commit 2e3cfdb

Please sign in to comment.