diff options
author | Roman Perepelitsa <roman.perepelitsa@gmail.com> | 2022-01-04 14:14:19 +0300 |
---|---|---|
committer | Roman Perepelitsa <roman.perepelitsa@gmail.com> | 2022-01-04 14:14:19 +0300 |
commit | 2079d8ecbe68368d1114b332169778512b62e579 (patch) | |
tree | 56a5964d4edf4cbf56c8d5ece5e725aa60125b7e /gitstatus/build | |
parent | 3d3b24c419a3b35b632e96fe9de34641e06f8521 (diff) | |
parent | c8160f29543a2f57ae7149103deefa029fd4e861 (diff) |
Merge commit 'c8160f29543a2f57ae7149103deefa029fd4e861'
Diffstat (limited to 'gitstatus/build')
-rwxr-xr-x | gitstatus/build | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gitstatus/build b/gitstatus/build index d23f8fc1..ad39910a 100755 --- a/gitstatus/build +++ b/gitstatus/build @@ -12,11 +12,24 @@ fi export LC_ALL=C if [ -z "${ZSH_VERSION-}" ] && command -v zsh >/dev/null 2>&1; then + # Avoid bash 3.*. case "${BASH_VERSION-}" in [0-3].*) exec zsh "$0" "$@";; esac fi +# Avoid ksh: https://github.com/romkatv/gitstatus/issues/282. +if [ -n "${KSH_VERSION-}" ]; then + if [ -z "${ZSH_VERSION-}" ] && command -v zsh >/dev/null 2>&1; then + exec zsh "$0" "$@" + elif [ -z "${BASH_VERSION-}" ] && command -v bash >/dev/null 2>&1 && + bash_version="$(bash --version 2>&1)"; then + case "$bash_version" in + *version\ [4-9]*|*version\ [1-9][0-9]*) exec bash "$0" "$@";; + esac + fi +fi + usage="$(command cat <<\END Usage: build [-m ARCH] [-c CPU] [-d CMD] [-i IMAGE] [-s] [-w] @@ -91,7 +104,7 @@ if [ -n "$gitstatus_install_tools" ]; then command pkg install -y cmake gmake binutils git perl5 wget ;; openbsd) - command pkg_add install cmake gmake gcc git wget + command pkg_add cmake gmake gcc g++ git wget ;; netbsd) command pkgin -y install cmake gmake binutils git @@ -509,6 +522,7 @@ if [ -z "$gitstatus_cpu" ]; then arm64|aarch64) gitstatus_cpu=armv8-a;; ppc64le) gitstatus_cpu=powerpc64le;; riscv64) gitstatus_cpu=rv64imafdc;; + loongarch64) gitstatus_cpu=loongarch64;; x86_64|amd64) gitstatus_cpu=x86-64;; x86) gitstatus_cpu=i586;; s390x) gitstatus_cpu=z900;; |