forked from joshfinnie/archey-osx
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·49 lines (39 loc) · 899 Bytes
/
install.sh
File metadata and controls
executable file
·49 lines (39 loc) · 899 Bytes
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
#!/bin/bash
#Script for installing/uninstalling OSXey
#List of options
echo ""
echo "Please choose an option:"
echo "1. Install OSXey to /usr/local/bin"
echo "2. Uninstall OSXey from /usr/local/bin"
echo -n "Option: "
read answer
echo ""
#If statements based on asnwer
if [ $answer == 1 ]
then
#create directory if it doesn't exist
if [ ! -d "/usr/local/bin/" ]
then
echo "Creating /usr/local/bin/"
mkdir -pv -m 755 /usr/local/bin/
fi
#copy script
sudo cp OSXey Models.txt /usr/local/bin/
sudo chmod +x /usr/local/bin/OSXey
#display message
tput setaf 2
echo "Installed Sucessfully"
tput sgr0
elif [ $answer == 2 ]
then
#remove script
sudo rm -f /usr/local/bin/OSXey /usr/local/bin/Models.txt
#display message
tput setaf 2
echo "Uninstalled Sucessfully"
tput sgr0
else
echo "Command not supported."
exit
fi
exit