aboutsummaryrefslogtreecommitdiff
path: root/lib/_ak_ipfs
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-06-07 02:36:29 +0300
committerkaotisk <kaotisk@arching-kaos.org>2024-06-07 02:36:29 +0300
commit107782d5859467ce91b8ddd3a88be84782ff7f4f (patch)
treec1906f4827bfec3b6621b0324e8851cd0b2e5ef8 /lib/_ak_ipfs
parentbcdf925fa241545fbcfad283c2aeb96d21656c11 (diff)
downloadarching-kaos-tools-107782d5859467ce91b8ddd3a88be84782ff7f4f.tar.gz
arching-kaos-tools-107782d5859467ce91b8ddd3a88be84782ff7f4f.tar.bz2
arching-kaos-tools-107782d5859467ce91b8ddd3a88be84782ff7f4f.zip
Introducing multi-arch compatibility
Diffstat (limited to 'lib/_ak_ipfs')
-rwxr-xr-xlib/_ak_ipfs10
1 files changed, 10 insertions, 0 deletions
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"