-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathinstall.sh
91 lines (79 loc) · 1.93 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/bin/bash
# DEPRECATED 9.11.2019.
### Checking if tools are installed
if ! [ -x "$(command -v youtube-dl)" ]; then
echo $"Error: youtube-dl is not installed."
echo $"Please, install the tool as mentioned in the installation guide."
fi
### Moving files
mkdir $HOME/phdler
echo $"phdler folder created"
cp phdler.sh $HOME/phdler/phdler.sh
chmod +x $HOME/phdler/phdler.sh
cp phdler.config $HOME/phdler/phdler.config
cp update.sh $HOME/phdler/update.sh
chmod +x $HOME/phdler/update.sh
echo $"script & config moved"
if [ -f "$HOME/phdler/stars.txt" ]
then
echo "stars.txt exists"
else
touch $HOME/phdler/stars.txt
echo "stars.txt created"
fi
if [ -f "$HOME/phdler/stars-new.txt" ]
then
echo "stars-new.txt exists"
else
touch $HOME/phdler/stars-new.txt
echo "stars-new.txt created"
fi
if [ -f "$HOME/phdler/models.txt" ]
then
echo "models.txt exists"
else
touch $HOME/phdler/models.txt
echo "models.txt created"
fi
if [ -f "$HOME/phdler/models-new.txt" ]
then
echo "models-new.txt exists"
else
touch $HOME/phdler/models-new.txt
echo "models-new.txt created"
fi
if [ -f "$HOME/phdler/users.txt" ]
then
echo "users.txt exists"
else
touch $HOME/phdler/users.txt
echo "users.txt created"
fi
if [ -f "$HOME/phdler/users-new.txt" ]
then
echo "users-new.txt exists"
else
touch $HOME/phdler/users-new.txt
echo "users-new.txt created"
fi
if [ -f "$HOME/phdler/channels.txt" ]
then
echo "channels.txt exists"
else
touch $HOME/phdler/channels.txt
echo "channels.txt created"
fi
if [ -f "$HOME/phdler/channels-new.txt" ]
then
echo "channels-new.txt exists"
else
touch $HOME/phdler/channels-new.txt
echo "channels-new.txt created"
fi
echo "-----------------"
echo "Script installed."
echo "-----------------"
echo "Please run this command as admin:"
echo "sudo ln -s ~/phdler/phdler.sh /usr/local/bin/phdler"
echo "-----------------"
exit 1;