From 35bd1c04dbafc7eef2b901a372ef396a622741d5 Mon Sep 17 00:00:00 2001
From: George Wilson <george@wils.online>
Date: Mon, 18 Feb 2019 15:48:16 +1000
Subject: [PATCH] Only read the FreeBSD major version

---
 ghcup | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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