-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathiimatey-setup.sh
executable file
·55 lines (50 loc) · 1.2 KB
/
iimatey-setup.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/env bash
set -x
set -e
# What Architecture
case $(uname -m) in
arm64)
export ARCH=arm64
;;
amd64)
export ARCH=amd64
;;
x86_64)
export ARCH=amd64
;;
esac
case $(uname -o) in
GNU/Linux)
export OS=linux
case $(lsb-release -i) in
Bluefin)
brew install ttyd tmux curl
;;
Ubuntu)
sudo apt-get update
sudo apt-get install -y ttyd tmux curl
;;
Debian)
sudo apt-get update
sudo apt-get install -y ttyd tmux curl
;;
esac
;;
Darwin)
brew install ttyd tmux curl
export OS=darwin
;;
esac
# Install tunnel from github release
TUNNEL_RELEASE=v0.1.14
TUNNEL_URL=https://github.com/ii/wgtunnel/releases/download/$TUNNEL_RELEASE/tunnel-$OS-$ARCH
sudo curl -L -o /usr/local/bin/tunnel $TUNNEL_URL
sudo chmod 0755 /usr/local/bin/tunnel # make executeable
# WHAT WE NEED
tmux -V
ttyd --version
/usr/local/bin/tunnel -V
echo $PATH | grep /usr/local/bin >/dev/null || echo "You may want to add /usr/local/bin to your PATH"
# Install iimatey script from github
sudo curl -o /usr/local/bin/iimatey -L https://raw.githubusercontent.com/ii/matey/canon/iimatey
sudo chmod +x /usr/local/bin/iimatey