diff --git a/base/.local/share/buddy-up/includes/utils.sh b/base/.local/share/buddy-up/includes/utils.sh index c386bd3..c9351db 100644 --- a/base/.local/share/buddy-up/includes/utils.sh +++ b/base/.local/share/buddy-up/includes/utils.sh @@ -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 }