From 107782d5859467ce91b8ddd3a88be84782ff7f4f Mon Sep 17 00:00:00 2001 From: kaotisk Date: Fri, 7 Jun 2024 02:36:29 +0300 Subject: Introducing multi-arch compatibility --- lib/_ak_ipfs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/_ak_ipfs') diff --git a/lib/_ak_ipfs b/lib/_ak_ipfs index 673dafb..db6832e 100755 --- a/lib/_ak_ipfs +++ b/lib/_ak_ipfs @@ -370,6 +370,16 @@ _ak_ipfs_download(){ IPFS_VERSION="$(curl \ --connect-timeout 3 \ -s https://dist.ipfs.tech/kubo/versions | tail -1)" + if [ "$(uname --machine)" == "x86_64" ] + then + ARCH="amd64" + elif [ "$(uname --machine)" == "x86_64" ] + then + ARCH="arm64" + else + echo "ERROR UNKNOWN ARCHITECTURE $(uname --machine)" + exit 1 + fi IPFS_TARGET_FILE="kubo_"$IPFS_VERSION"_linux-amd64.tar.gz" logit "INFO" "Downloading ipfs $IPFS_VERSION" -- cgit v1.2.3