forked from kevincobain2000/gobrew
-
Notifications
You must be signed in to change notification settings - Fork 0
/
git.io.sh
executable file
·52 lines (42 loc) · 1.08 KB
/
git.io.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
#!/bin/sh
GOBREW_BIN_DIR=$HOME/.gobrew/bin
mkdir -p $GOBREW_BIN_DIR
GOBREW_ARCH_BIN=''
THISOS=$(uname -s)
ARCH=$(uname -m)
case $THISOS in
Linux*)
GOBREW_ARCH_BIN="gobrew-linux-64"
;;
Darwin*)
case $ARCH in
arm64)
GOBREW_ARCH_BIN="gobrew-darwin-arm-64"
;;
*)
GOBREW_ARCH_BIN="gobrew-darwin-64"
;;
esac
;;
Windows*)
GOBREW_ARCH_BIN="gobrew-windows-64.exe"
;;
esac
if [ -z "$GOBREW_VERSION" ]
then
GOBREW_VERSION=master
echo "Using gobrew version latest\n"
else
echo "Using gobrew version $GOBREW_VERSION\n"
fi
curl -kLs https://raw.githubusercontent.com/kevincobain2000/gobrew/master/bin/$GOBREW_ARCH_BIN -o $GOBREW_BIN_DIR/gobrew
chmod +x $GOBREW_BIN_DIR/gobrew
echo "Installed successfully to: $GOBREW_BIN_DIR/gobrew"
echo "============================"
$GOBREW_BIN_DIR/gobrew help
echo "============================"
echo
echo "***Please add PATH below to your ~/.bashrc manually***"
echo
echo 'export PATH="$HOME/.gobrew/current/bin:$HOME/.gobrew/bin:$PATH"'
echo