mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-18 21:46:19 -04:00
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)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user