From 3470db0db2a316d96e849afe968c78a88eec2edd Mon Sep 17 00:00:00 2001 From: Krayon Date: Thu, 15 Mar 2018 13:42:29 +1100 Subject: [PATCH 1/3] Proposed fix #319 - non-portable `uname -i` use *UNTESTED* --- functions.sh | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/functions.sh b/functions.sh index d007db2f..1bc47b9c 100644 --- a/functions.sh +++ b/functions.sh @@ -31,26 +31,16 @@ OPTIONS="-o Debug::NoLocking=1 # Detect system architecture to know which binaries of AppImage tools # should be downloaded and used. -case "$(uname -i)" in +case "$(uname -m)" in x86_64|amd64) # echo "x86-64 system architecture" SYSTEM_ARCH="x86_64";; i?86) # echo "x86 system architecture" SYSTEM_ARCH="i686";; -# arm*) +# arm*|aarch*) # echo "ARM system architecture" # SYSTEM_ARCH="";; - unknown|AuthenticAMD|GenuineIntel) -# uname -i not answer on debian, then: - case "$(uname -m)" in - x86_64|amd64) -# echo "x86-64 system architecture" - SYSTEM_ARCH="x86_64";; - i?86) -# echo "x86 system architecture" - SYSTEM_ARCH="i686";; - esac ;; *) echo "Unsupported system architecture" exit 1;; From 870223e182c0753d75a5a973a3f212fcd26ca7a9 Mon Sep 17 00:00:00 2001 From: Krayon Date: Mon, 19 Mar 2018 03:57:24 +1100 Subject: [PATCH 2/3] Make unsupported arch error clearer --- functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.sh b/functions.sh index 1bc47b9c..3bfe6c50 100644 --- a/functions.sh +++ b/functions.sh @@ -42,7 +42,7 @@ case "$(uname -m)" in # echo "ARM system architecture" # SYSTEM_ARCH="";; *) - echo "Unsupported system architecture" + echo "Unsupported system architecture: $(uname -m)" exit 1;; esac From 4b7b32657f203513d93dd253bf708585af90872d Mon Sep 17 00:00:00 2001 From: Krayon Date: Sat, 2 Jun 2018 01:42:59 +1000 Subject: [PATCH 3/3] Requested changes to #319 fix *UNTESTED* --- functions.sh | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/functions.sh b/functions.sh index 3bfe6c50..341a23d6 100644 --- a/functions.sh +++ b/functions.sh @@ -31,19 +31,33 @@ OPTIONS="-o Debug::NoLocking=1 # Detect system architecture to know which binaries of AppImage tools # should be downloaded and used. -case "$(uname -m)" in +case "$(uname -i)" in x86_64|amd64) # echo "x86-64 system architecture" SYSTEM_ARCH="x86_64";; i?86) # echo "x86 system architecture" SYSTEM_ARCH="i686";; -# arm*|aarch*) +# arm*) # echo "ARM system architecture" # SYSTEM_ARCH="";; *) - echo "Unsupported system architecture: $(uname -m)" - exit 1;; + # uname '-i' isn't portable so when failing, fall back to uname's + # recommended switch '-m': + case "$(uname -m)" in + x86_64|amd64) +# echo "x86-64 system architecture" + SYSTEM_ARCH="x86_64";; + i?86) +# echo "x86 system architecture" + SYSTEM_ARCH="i686";; +# arm*|aarch*) +# echo "ARM system architecture" +# SYSTEM_ARCH="";; + *) + echo "Unsupported system architecture: $(uname -m)" + exit 1;; + esac ;; esac # Either get the file from remote or from a static place.