-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·55 lines (50 loc) · 1.05 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
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/sh
echo "=> Browse to find old versions..."
FILE=/usr/local/lib/discordci/
if [ -d $FILE ]
then
echo "=> Erasing old repository..."
sudo rm -rf $FILE
fi
FILE=/usr/bin/discordci
if [ -f $FILE ]
then
echo "=> Erasing old bin..."
sudo rm -rf $FILE
fi
tput setaf 2
echo "=> Done cleaning"
tput sgr0
echo "=> PLS give an empty repository link"
while read line; do
link=$line
break
done
echo "=> PLS give discord webhook link"
while read line; do
discord=$line
break
done
echo "=> Creating repository..."
git clone $link discordci
sudo mv discordci /usr/local/lib
sudo echo $discord > /usr/local/lib/discordci/weblink
tput setaf 2
echo "=> Repository_created"
tput sgr0
echo "=> Copying source code..."
sudo cp src/discordci /usr/local/bin/
tput setaf 2
echo "=> Done copying source code"
tput sgr0
echo "=> Giving permissions..."
sudo chmod 777 /usr/local/bin/discordci
sudo chmod -R 777 /usr/local/lib/discordci
tput setaf 2
echo "=> Permissions given"
tput sgr0
tput setab 2
tput blink
echo "=> Installation Done"
tput init
tput sgr0