Astroport.ONE/kubo_v0.16.0_linux.install.sh

32 lines
853 B
Bash
Raw Normal View History

2023-01-06 22:20:17 +01:00
#!/bin/bash
[ $(id -u) -eq 0 ] && echo "LANCEMENT root INTERDIT. Utilisez un simple utilisateur du groupe \"sudo\" SVP" && exit 1
mkdir ~/.zen/tmp
cd ~/.zen/tmp
# Check processor architecture
architecture=$(uname -m)
# Download appropriate version of kubo
if [ "$architecture" == "x86_64" ]; then
2023-01-08 20:02:49 +01:00
wget -O kubo.tar.gz https://dist.ipfs.tech/kubo/v0.16.0/kubo_v0.16.0_linux-amd64.tar.gz
2023-01-06 22:20:17 +01:00
elif [ "$architecture" == "aarch64" ]; then
2023-01-08 20:02:49 +01:00
wget -O kubo.tar.gz https://dist.ipfs.tech/kubo/v0.16.0/kubo_v0.16.0_linux-arm64.tar.gz
elif [ "$architecture" == "armv7l" ]; then
2023-01-08 20:02:49 +01:00
wget -O kubo.tar.gz https://dist.ipfs.tech/kubo/v0.16.0/kubo_v0.16.0_linux-arm.tar.gz
2023-01-06 22:20:17 +01:00
else
echo "Error: Unknown architecture"
exit 1
fi
2023-01-08 20:02:49 +01:00
tar -xvzf kubo.tar.gz
2023-01-06 22:20:17 +01:00
cd kubo
# Install
sudo bash install.sh
# Test & clean
[[ $(ipfs --version) ]] \
&& rm -Rf ~/.zen/tmp/kubo*