-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·60 lines (53 loc) · 2.18 KB
/
install.sh
File metadata and controls
executable file
·60 lines (53 loc) · 2.18 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#! /bin/bash
# colors
RED='\033[0;31m'
NC='\033[0m' # No Color
# Useless decorative messages
echo -e "${RED}
********** ** ** ** **** ****
/////**/// /** // /** /**/** **/**
/** /** ** ******* /** **/**//** ** /** ****** ****** ****** *****
/** /****** /**//**///**/** ** /** //*** /** **////**//**//* **//// **///**
/** /**///**/** /** /**/**** /** //* /**/** /** /** / //***** /*******
/** /** /**/** /** /**/**/** /** / /**/** /** /** /////**/**////
/** /** /**/** *** /**/**//**/** /**//****** /*** ****** //******
// // // // /// // // // // // ////// /// ////// //////
${NC}"
echo "--------------------------"
echo "Prepare for install!"
function thinkmorseWithoutUpdate () {
# I know that if someone is running this script they probably just cloned the repo and are up to date but still
echo "Skipping Update"
# Amazing fake loading bar! Totally not from stack overflow/exchange
sudo cp -i ./thinkmorse.sh /usr/bin/thinkmorse
sudo chmod +x /usr/bin/thinkmorse
echo -ne '##### (33%)\r'
sleep 2
echo -ne '############# (66%)\r'
sleep 2
echo -ne '####################### (100%)\r'
echo -ne '\n'
echo -e "${RED}ThinkMorse${NC} has now been installed"
}
function thinkmorseWithUpdate () {
# I know that if someone is running this script they probably just cloned the repo and are up to date but still
echo "Making sure we are up to date"
git fetch --all
git reset --hard origin/master -q
echo "All done updating"
# Amazing fake loading bar! Totally not from stack overflow/exchange
sudo cp -i ./thinkmorse.sh /usr/bin/thinkmorse
sudo chmod +x /usr/bin/thinkmorse
echo -ne '##### (33%)\r'
sleep 2
echo -ne '############# (66%)\r'
sleep 2
echo -ne '####################### (100%)\r'
echo -ne '\n'
echo -e "${RED}ThinkMorse${NC} has now been installed"
}
if [ $1 ]; then
thinkmorseWithoutUpdate
else
thinkmorseWithUpdate
fi