updated install_binary.sh

pull/2/head
Hari Sekhon 3 years ago
parent effa54964d
commit 5f0f25f904

@ -79,7 +79,15 @@ timestamp "Setting executable"
chmod +x "$download_file"
echo
destination="${3:-${download_file##*/}}"
destination="${3:-}"
if [ -z "$destination" ]; then
destination="${download_file##*/}"
destination="${destination%%.$$}"
# if there are any -darwin-amd64 or -amd64-darwin suffixes remove them either way around (this is why $os is stripped before and after)
destination="${destination%%-$os}"
destination="${destination%%-$arch}"
destination="${destination%%-$os}"
fi
if ! [[ "$destination" =~ ^/ ]]; then
if [ $EUID = 0 ]; then

Loading…
Cancel
Save