-
Notifications
You must be signed in to change notification settings - Fork 5
/
install.sh
36 lines (30 loc) · 824 Bytes
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
set -e
apk add --update --no-cache unzip curl
# Detect architecture
ARCH=""
case $(uname -m) in
x86_64)
ARCH="amd64"
;;
armv7l)
ARCH="arm"
;;
aarch64)
ARCH="arm64"
;;
*)
echo "Unknown arch: `uname -m`"
exit 1
esac
# Download & extract binaries
curl -LO https://github.com/storj/storj/releases/download/v${STORJ_VERSION}/multinode_linux_${ARCH}.zip
curl -LO https://github.com/storj/storj/releases/download/v${STORJ_VERSION}/identity_linux_${ARCH}.zip
unzip multinode_linux_${ARCH}.zip && rm multinode_linux_${ARCH}.zip
unzip identity_linux_${ARCH}.zip && rm identity_linux_${ARCH}.zip
# Move binaries and set executable flag
mv multinode /usr/local/bin/
mv identity /usr/local/bin/
chmod +x /usr/local/bin/multinode
chmod +x /usr/local/bin/identity
apk del curl unzip