updated install_binary.sh

pull/2/head
Hari Sekhon 3 years ago
parent ee22784806
commit 79fd3cbea8

@ -56,6 +56,8 @@ if [[ "$package" =~ \.zip$ ]] || has_tarball_extension "$package"; then
usage "binary file path must be specified if downloading a tarball or zip file ('$package')"
fi
binary="$2"
binary="${binary//\{os\}/$os}"
binary="${binary//\{arch\}/$arch}"
fi
timestamp "Downloading"
@ -85,8 +87,11 @@ if [ -z "$destination" ]; then
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%%_$os}"
destination="${destination%%-$arch}"
destination="${destination%%_$arch}"
destination="${destination%%-$os}"
destination="${destination%%_$os}"
fi
if ! [[ "$destination" =~ ^/ ]]; then

Loading…
Cancel
Save