This commit is contained in:
Luk Lu
2023-03-07 08:12:24 +08:00
parent dd3c8ab167
commit 6e950b54cd
5 changed files with 29 additions and 16 deletions

View File

@@ -12,11 +12,24 @@ else
fi
fi
echo Download https://dist.ipfs.tech/kubo/v$VERSION/kubo_v${VERSION}_linux-amd64.tar.gz
curl https://dist.ipfs.tech/kubo/v$VERSION/kubo_v${VERSION}_linux-amd64.tar.gz -o kubo_v$VERSION.tgz
if [[ "$(uname -m)" = "aarch64" ]];
then
ARCH=arm64
elif [[ "$(uname -m)" = "armv7l" ]];
then
ARCH=arm
elif [[ "$(uname -m)" = "x86_64" ]];
then
ARCH=amd64
fi
echo Download https://dist.ipfs.tech/kubo/v$VERSION/kubo_v${VERSION}_linux-${ARCH}.tar.gz
curl https://dist.ipfs.tech/kubo/v$VERSION/kubo_v${VERSION}_linux-${ARCH}.tar.gz -o kubo_v$VERSION.tgz
tar xzf kubo_v$VERSION.tgz
rm -fr kubo_v$VERSION.tgz
## install ./kubo/ipfs to /usr/local/bin/ipfs
cd kubo && sudo bash install.sh
cd .. && rm -fr kubo/
# echo "alias ipfs=`pwd`/kubo/ipfs" >> ~/.bashrc_custom
# alias ipfs=`pwd`/kubo/ipfs