Add more operating systems and architectures for get_os/get_arch

main
Buddy Sandidge 4 years ago
parent fb74e39a2b
commit cd19545af2

@ -15,7 +15,14 @@ get_os () {
case $(uname -s) in case $(uname -s) in
Linux*) echo linux;; Linux*) echo linux;;
Darwin*) echo darwin;; Darwin*) echo darwin;;
*) bail "unsupported os: $(uname -s)" ;; Dragonfly*) echo dragonfly;;
FreeBSD*) echo freebsd;;
NetBSD*) echo netbsd;;
OpenBSD*) echo openbsd;;
SunOS*) echo solaris;;
Windows_NT*) echo windows;;
CYGWIN_NT*) echo windows;;
*) >&2 echo "unsupported os"; return;
esac esac
} }
@ -23,7 +30,14 @@ get_arch () {
case $(uname -m) in case $(uname -m) in
x86_64*) echo amd64;; x86_64*) echo amd64;;
amd64*) echo amd64;; amd64*) echo amd64;;
*) bail "unsupported architecture: $(uname -m)" ;; i386*) echo 386;;
i686*) echo 386;;
arm) echo arm;;
armv7*) echo arm;;
armv6*) echo arm;;
armv8*) echo arm;;
aarch64*) echo arm64;;
*) >&2 echo "unsupported architecture: $(uname -m)"; exit 1;;
esac esac
} }

Loading…
Cancel
Save