-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall
More file actions
executable file
·46 lines (38 loc) · 1.13 KB
/
install
File metadata and controls
executable file
·46 lines (38 loc) · 1.13 KB
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
#!/bin/sh
case $(uname -ms) in
'Darwin x86_64')
target=darwin-amd64
;;
'Darwin arm64')
target=darwin-arm64
;;
'Linux aarch64' | 'Linux arm64')
target=linux-arm64
;;
'Linux x86_64' | *)
target=linux-amd64
;;
esac
downloadURL=https://github.com/manas140/seam/releases/latest/download/seam-$target
printf '\033[1;32mINFO:\033[0;0m Downloading\n'
curl --fail --location --progress-bar --output "./seam" "$downloadURL" || exit 1
printf "\n\033[1;32mINFO:\033[0;0m Installing\n"
chmod +x ./seam
mkdir -p ~/.local/bin/ 2>/dev/null
mv ./seam ~/.local/bin/
case $(basename "$SHELL") in
"bash")
if ! $( type "seam" >/dev/null); then
printf "export PATH=\"\$PATH:$HOME/.local/bin/\"\n" >> ~/.bashrc
fi
;;
"zsh")
if ! $( type "seam" >/dev/null); then
printf "export PATH=\"\$PATH:$HOME/.local/bin/\"\n" >> ~/.zshrc
fi
;;
*)
printf "\n\033[1;35mERROR:\033[0;0m shell not supported, please manually add directory to path (.bashrc or similar)\nexport PATH=\"\$PATH:~/.local/bin/\"\n"
;;
esac
printf "\n\033[1;32mTo get started run:\033[0;0m\n exec $(basename $SHELL)\n seam -h\n"