Only read the FreeBSD major version

This commit is contained in:
George Wilson 2019-02-18 15:48:16 +10:00
parent bb80559fb3
commit 35bd1c04db

6
ghcup
View File

@ -649,9 +649,9 @@ get_distro_ver() {
printf "%s" "$(uname -v)" printf "%s" "$(uname -v)"
;; ;;
FreeBSD) FreeBSD)
# we only care about the numeric version part left of # we only care about the major numeric version part left of
# the '-' in "11.2-RELEASE". # the '.' in "11.2-RELEASE".
printf "%s" "$(uname -r | cut -d - -f 1)" printf "%s" "$(uname -r | cut -d . -f 1)"
;; ;;
*) *)
# Fall back to uname, e.g. "Linux <version>", also works for BSD, etc. # Fall back to uname, e.g. "Linux <version>", also works for BSD, etc.