Przeglądaj źródła

tweak - normalise unix-like identifiers to support git bash for windows (#2100)

Co-authored-by: Steven Martin <[email protected]>
Steven Martin 5 miesięcy temu
rodzic
commit
36b48a44ac
1 zmienionych plików z 8 dodań i 4 usunięć
  1. 8 4
      install

+ 8 - 4
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