-
Notifications
You must be signed in to change notification settings - Fork 4
/
install.sh
executable file
·42 lines (33 loc) · 1.15 KB
/
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
37
38
39
40
41
42
#!/bin/bash
# execute this script with ./install.sh
if [ "$OSTYPE" == "cygwin" ]; then
echo "WINDOWS x64 installation not supported"
elif [ "$OSTYPE" == "win32" ]; then
echo "WINDOWS x86 installation not supported"
elif [ "$OSTYPE" == "darwin" ]; then
echo "Darwin installation not supported"
elif [ "$OSTYPE" == "linux-gnu" ]; then
echo "> Linux installation :"
mkdir /tmp/strettotemp
cd /tmp/strettotemp
mkdir usr
wget https://storage.googleapis.com/golang/go1.6.2.linux-amd64.tar.gz
tar -C ./usr -xzf go1.6.2.linux-amd64.tar.gz
export GOROOT=/tmp/strettotemp/usr
export PATH=$PATH:$GOROOT/go/bin
export GOPATH=/tmp/strettotemp/strettoinstall
mkdir strettoinstall
echo "--> Application will now be installed"
cd $GOPATH
go get github.com/stretto-editor/stretto
cd $GOPATH/src/github.com/stretto-editor/stretto
go install
mv stretto.json $HOME/.stretto.json
mv Commands.md $HOME
mv $GOPATH/bin/stretto $HOME
cd $HOME
rm -rf /tmp/strettotemp
echo "----> Installation of Stretto completed"
echo "-----> Stretto application is now in $HOME"
echo "-----> You can now move stretto and Commands.md file to your /usr/bin"
fi