From 976c64f241e38e220065e698b2d6152068e9bc73 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Tue, 10 Dec 2024 14:57:06 +0200 Subject: Compatibility with FreeBSD 'uname' --- lib/_ak_ipfs | 11 +++++++---- 1 file 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" -- cgit v1.2.3