-f, --force Overwrite already existing installation$(${VERBOSE}&&printf"\n -o, --os Overwrite OS detection with the given string (must be a correct OS alias, e.g. 'alpine')")
ARGS:
[VERSION|TAG] E.g. \"8.4.3\" or \"8.6.1\" or
...
...
@@ -807,7 +807,7 @@ check_meta_file_version() {
}
# @FUNCTION: get_download_url
# @USAGE: <tool> <version>
# @USAGE: <tool> <version> [os-overwrite]
# @DESCRIPTION:
# Gets the download url for the given tool and version
# and the current distro and architecture (which it tries to discover).
...
...
@@ -820,7 +820,11 @@ get_download_url() {
myver=$2
myarch=$(get_arch)
[-z"${myarch}"]&& die "failed to get architecture"
mydistro=$(get_distro_alias "$(get_distro_name)")
if[-n"$3"];then
mydistro=$(get_distro_alias "$3")
else
mydistro=$(get_distro_alias "$(get_distro_name)")
fi
mydistrover=$(get_distro_ver)
meta_file="$(get_meta_download_file)"
[-z"${meta_file}"]&& die "failed to get meta file"
...
...
@@ -1127,22 +1131,22 @@ get_distro_alias() {
"CentOS Linux"|"CentOS"|"centos"|"Red Hat Enterprise Linux"*)
distro_alias=centos
;;
"Alpine Linux"|"Alpine")
"Alpine Linux"|"Alpine"|"alpine")
distro_alias=alpine
;;
"Linux Mint"|"LinuxMint")
"Linux Mint"|"LinuxMint"|"linuxmint")
distro_alias=mint
;;
"Amazon Linux AMI")
"Amazon Linux AMI"|"amazonlinux")
distro_alias=amazonlinux
;;
"AIX")
"AIX"|"aix")
distro_alias=aix
;;
"FreeBSD")
"FreeBSD"|"freebsd")
distro_alias=freebsd
;;
"Darwin")
"Darwin"|"darwin")
distro_alias=darwin
;;
esac
...
...
@@ -1402,7 +1406,7 @@ set_ghc_major() {
# @FUNCTION: install_ghc
# @USAGE: <ghcversion>
# @USAGE: <ghcversion> [os-overwrite]
# @DESCRIPTION:
# Installs the given ghc version with a lot of side effects.
install_ghc(){
...
...
@@ -1411,7 +1415,7 @@ install_ghc() {
myghcver=$1
inst_location=$(get_ghc_location "$1")
[-z"${inst_location}"]&& die "failed to get install location"