From 88e458c34a74c56639035e90376419851d8f8a0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Weigert?= Date: Mon, 30 Jun 2025 14:00:11 +0200 Subject: [PATCH 1/2] Make install.sh work with: uname -a Linux datenheim 6.6.0-odroid-arm64 #1 SMP PREEMPT Mon, 04 Nov 2024 09:52:06 +0000 aarch64 aarch64 aarch64 GNU/Linux --- deployments/examples/bare-metal-simple/install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deployments/examples/bare-metal-simple/install.sh b/deployments/examples/bare-metal-simple/install.sh index 88b8c1f2b4..843eba140c 100755 --- a/deployments/examples/bare-metal-simple/install.sh +++ b/deployments/examples/bare-metal-simple/install.sh @@ -69,6 +69,10 @@ if [[ $(uname -s) == "Darwin" && $(uname -m) == "arm64" ]]; then dlarch="arm64" fi +if [[ $(uname -s) == "Linux" && $(uname -m) == "aarch64" ]]; then + dlarch="arm64" +fi + # ...results in the download file dlfile="opencloud-${dlversion}-${os}-${dlarch}" From 02d793169d9633820eaae9a0ae2fdc607c898723 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Weigert?= Date: Tue, 1 Jul 2025 14:54:59 +0200 Subject: [PATCH 2/2] Merge two similar if-clauses into one. Hope readability does not suffer too much. Add best practice doublequotes around $() expansions (although we are pretty safe here) --- deployments/examples/bare-metal-simple/install.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/deployments/examples/bare-metal-simple/install.sh b/deployments/examples/bare-metal-simple/install.sh index 843eba140c..a36e91fef6 100755 --- a/deployments/examples/bare-metal-simple/install.sh +++ b/deployments/examples/bare-metal-simple/install.sh @@ -58,18 +58,15 @@ mkdir ${sandbox} && cd ${sandbox} # The operating system os="linux" -if [[ $OSTYPE == 'darwin'* ]]; then +if [[ "$OSTYPE" == 'darwin'* ]]; then os="darwin" fi # The platform dlarch="amd64" -if [[ $(uname -s) == "Darwin" && $(uname -m) == "arm64" ]]; then - dlarch="arm64" -fi - -if [[ $(uname -s) == "Linux" && $(uname -m) == "aarch64" ]]; then +if [[ ( "$(uname -s)" == "Darwin" && "$(uname -m)" == "arm64" ) || + ( "$(uname -s)" == "Linux" && "$(uname -m)" == "aarch64" ) ]]; then dlarch="arm64" fi