-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathinstall
executable file
·77 lines (67 loc) · 1.82 KB
/
install
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#! /bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run with root privileges"
exit
fi
echo "Checking the version of Sublime .. .."
sublimeVersion=0
if [ -d ~/.config/sublime-text-3 ]
then
sublimeVersion=3
elif [ -d ~/.config/sublime-text-2 ]
then
sublimeVersion=2
else
echo "No Sublime Text found on System at path /.config/sublime-text-x .. .."
echo "Aborting : Error !!"
fi
echo "Changing permission of the commands .. .."
chmod -R 777 src_linux/
if [ $? -ne 0 ]
then
echo "Aborting : Error"
exit
fi
echo "Copying Buggy to ~/.config/sublime-text-$sublimeVersion/Packages/User/ .. .."
cp -r Buggy ~/.config/sublime-text-$sublimeVersion/Packages/User/
if [ $? -ne 0 ]
then
echo "Aborting : Error"
exit
fi
echo "Copying unInstall to ~/.config/sublime-text-$sublimeVersion/Packages/User/Buggy/ .. .."
cp unInstall ~/.config/sublime-text-$sublimeVersion/Packages/User/Buggy/
if [ $? -ne 0 ]
then
echo "Aborting : Error"
exit
fi
echo "Copying src_linux/{ini.sh,start.sh,config,template.cpp,template.java} to ~/.config/sublime-text-$sublimeVersion/Packages/User/Buggy/bin/dist/ .. .."
cp src_linux/{ini.sh,start.sh,config,template.cpp,template.java} ~/.config/sublime-text-$sublimeVersion/Packages/User/Buggy/bin/dist/
if [ $? -ne 0 ]
then
echo "Aborting : Error"
exit
fi
echo "Changing permission of the directories .. .."
chmod -R 777 ~/.config/sublime-text-$sublimeVersion/Packages/User/Buggy/
if [ $? -ne 0 ]
then
echo "Aborting : Error"
exit
fi
echo "Copying commands to /usr/bin .. .."
cp src_linux/cmd/* /usr/bin/
if [ $? -ne 0 ]
then
echo "Aborting : Error"
exit
fi
echo "Copying README.md to ~/.config/sublime-text-$sublimeVersion/Packages/User/Buggy/conf/ .. .."
cp README.md ~/.config/sublime-text-$sublimeVersion/Packages/User/Buggy/conf/
if [ $? -ne 0 ]
then
echo "Aborting : Error"
exit
fi
echo "Installation Successful"