Add more operating systems and architectures for get_os/get_arch
This commit is contained in:
parent
fb74e39a2b
commit
cd19545af2
@ -13,9 +13,16 @@ must_be_root () {
|
||||
|
||||
get_os () {
|
||||
case $(uname -s) in
|
||||
Linux*) echo linux;;
|
||||
Darwin*) echo darwin;;
|
||||
*) bail "unsupported os: $(uname -s)" ;;
|
||||
Linux*) echo linux;;
|
||||
Darwin*) echo darwin;;
|
||||
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
|
||||
}
|
||||
|
||||
@ -23,7 +30,14 @@ get_arch () {
|
||||
case $(uname -m) in
|
||||
x86_64*) 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
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user