diff options
| author | Steven Martin <[email protected]> | 2025-10-31 16:41:44 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-10-31 11:41:44 -0500 |
| commit | 36b48a44ac1f0c9593a4abdf1d21980a2bfaee22 (patch) | |
| tree | 2019cee8de1074fbf769f0da3db11e7b2be11c17 /install | |
| parent | 5379abe33004f5fa7f63a5cee86ec442dc58d3a1 (diff) | |
| download | opencode-36b48a44ac1f0c9593a4abdf1d21980a2bfaee22.tar.gz opencode-36b48a44ac1f0c9593a4abdf1d21980a2bfaee22.zip | |
tweak - normalise unix-like identifiers to support git bash for windows (#2100)
Co-authored-by: Steven Martin <[email protected]>
Diffstat (limited to 'install')
| -rwxr-xr-x | install | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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 |
