add ipget fetcher script

This commit is contained in:
Jeffrey Paul 2018-10-02 14:17:32 -07:00
parent c7afdf1fa5
commit f0f74f7c10
Signed by: sneak
GPG Key ID: 052443F4DF2A55C2
1 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,15 @@
#!/bin/bash
# sneak@nostromo-2:~$ ipfs name resolve /ipns/dist.ipfs.io/ipget/v0.3.0/ipget_v0.3.0_linux-amd64.tar.gz
# /ipfs/QmUDECZXueqXdcBEu3SLf8J19QfubhksdrDZeh1exCVMDz/ipget/v0.3.0/ipget_v0.3.0_linux-amd64.tar.gz
# sneak@nostromo-2:~$ ipfs resolve /ipfs/QmUDECZXueqXdcBEu3SLf8J19QfubhksdrDZeh1exCVMDz/ipget/v0.3.0/ipget_v0.3.0_linux-amd64.tar.gz
# /ipfs/QmQcKL42JqZtWKjbcCys27iaAKybRcchSFWaD9sF8LEUKL
if [[ $(arch) = "x86_64" ]]; then
HASH="QmQcKL42JqZtWKjbcCys27iaAKybRcchSFWaD9sF8LEUKL"
curl -f https://cloudflare-ipfs.com/ipfs/$HASH > \
/tmp/ipget_v0.3.0_linux.amd64.tar.gz && \
cd /tmp && \
tar zxvf ./ipget_v0.3.0_linux.amd64.tar.gz && \
mv ipget/ipget /usr/local/bin/ipget
fi