-
Notifications
You must be signed in to change notification settings - Fork 2
/
check.sh
executable file
·63 lines (49 loc) · 1.11 KB
/
check.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
#!/bin/bash
if command -v firefox >/dev/null; then
firefox=1
else
firefox=0
fi
if command -v youtube-dl >/dev/null; then
youtube_dl=1
else
youtube_dl=0
fi
if command -v sqlite3 >/dev/null; then
sqlite3=1
else
sqlite3=0
fi
if [ $youtube_dl == 1 ]
then
echo 'youtube-dl is installed'
echo '# Array function is available'
else
echo '# this script needs youtube-dl'
echo 'sudo apt-get install youtube-dl'
exit
fi
if [ $firefox == 0 ]
then
echo '# Database function is not available'
echo 'sudo apt-get install firefox'
else
echo 'firefox is installed'
fi
if [ $sqlite3 == 0 ]
then
echo '# Database function is not available'
echo 'sudo apt-get install sqlite3'
else
echo 'sqlite3 is installed'
fi
if [ $youtube_dl == 1 ] && [ $firefox == 1 ] && [ $sqlite3 == 1 ]
then
echo '# database function is availabe'
echo '# Youtube Channels,Playlists Links must be stored in a bookmark folder. Variable is fav_dir'
else
echo '# database function needs youtube-dl + firefox + sqlite3'
fi
echo '# make download folder'
echo 'mkdir ~/Downloads/youtube-dl'
echo '# Open youtube-dl.sh with texteditor and config !'