summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xinstall12
1 files changed, 8 insertions, 4 deletions
diff --git a/install b/install
index ed3171c62..42ae846ef 100755
--- a/install
+++ b/install
@@ -10,10 +10,14 @@ NC='\033[0m' # No Color
requested_version=${VERSION:-}
-os=$(uname -s | tr '[:upper:]' '[:lower:]')
-if [[ "$os" == "darwin" ]]; then
- os="darwin"
-fi
+raw_os=$(uname -s)
+os=$(echo "$raw_os" | tr '[:upper:]' '[:lower:]')
+# Normalize various Unix-like identifiers
+case "$raw_os" in
+ Darwin*) os="darwin" ;;
+ Linux*) os="linux" ;;
+ MINGW*|MSYS*|CYGWIN*) os="windows" ;;
+ esac
arch=$(uname -m)
if [[ "$arch" == "aarch64" ]]; then