check.sh
4fc7435b
 #!/bin/bash
79f68f7f
 if command -v firefox >/dev/null; then
    firefox=1
4fc7435b
 else
     firefox=0
 fi
 
 
79f68f7f
 if command -v youtube-dl >/dev/null; then
4fc7435b
     youtube_dl=1
 else
     youtube_dl=0
 fi
 
 
79f68f7f
 if command -v sqlite3 >/dev/null; then
4fc7435b
     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 !'