aboutsummaryrefslogtreecommitdiff
path: root/lib/_ak_ipfs
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-12-10 14:57:06 +0200
committerkaotisk <kaotisk@arching-kaos.org>2024-12-10 14:57:06 +0200
commit976c64f241e38e220065e698b2d6152068e9bc73 (patch)
tree0e6280ead934b76636303865b58e6160e7f0f8ca /lib/_ak_ipfs
parent2ddc07ca822c86a211244bafc8eaf0df88fa33ba (diff)
downloadarching-kaos-tools-976c64f241e38e220065e698b2d6152068e9bc73.tar.gz
arching-kaos-tools-976c64f241e38e220065e698b2d6152068e9bc73.tar.bz2
arching-kaos-tools-976c64f241e38e220065e698b2d6152068e9bc73.zip
Compatibility with FreeBSD 'uname'
Diffstat (limited to 'lib/_ak_ipfs')
-rwxr-xr-xlib/_ak_ipfs11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/_ak_ipfs b/lib/_ak_ipfs
index cf4b140..aba5bad 100755
--- a/lib/_ak_ipfs
+++ b/lib/_ak_ipfs
@@ -436,17 +436,20 @@ _ak_ipfs_download(){
IPFS_VERSION="$(curl \
--connect-timeout 3 \
-s https://dist.ipfs.tech/kubo/versions | tail -1)"
- if [ "$(uname --machine)" == "x86_64" ]
+ if [ "$(uname -m)" == "amd64" ]
then
ARCH="amd64"
- elif [ "$(uname --machine)" == "armv7l" ]
+ elif [ "$(uname -m)" == "x86_64" ]
+ then
+ ARCH="amd64"
+ elif [ "$(uname -m)" == "armv7l" ]
then
ARCH="arm"
- elif [ "$(uname --machine)" == "aarch64" ]
+ elif [ "$(uname -m)" == "aarch64" ]
then
ARCH="arm64"
else
- echo "ERROR UNKNOWN ARCHITECTURE $(uname --machine)"
+ echo "ERROR UNKNOWN ARCHITECTURE $(uname -m)"
exit 1
fi
IPFS_TARGET_FILE="kubo_${IPFS_VERSION}_$(uname|tr "[:upper:]" "[:lower:]")-${ARCH}.tar.gz"