58 lines
1.2 KiB
Bash
Executable File
58 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
##############################################
|
|
# Title: Zymp3 v0.1.7
|
|
# Description: Convert youtube video to mp3
|
|
# Author: Justin Moore
|
|
# Created: Oct 12, 2011
|
|
# Updated: Mar 4, 2015
|
|
# Contact: mollusk@homebutter.com
|
|
# github: https://github.com/silvernode/zymp3
|
|
##############################################
|
|
|
|
|
|
#I wrote this in 2011 and realize now I could have done this alot better
|
|
|
|
|
|
|
|
#CHECK FOR CONFIG FILE
|
|
chk_conf(){
|
|
if [ -f config/zymp3.conf ];then
|
|
source config/zymp3.conf
|
|
|
|
|
|
|
|
else
|
|
echo -e "\e[1;31mERROR: No config file found, report bugs to: https://github.com/silvernode/zymp3/issues \e[0m"
|
|
zenity --error --text "No config file found, report bugs to: https://github.com/silvernode/zymp3/issues"
|
|
exit 0;
|
|
fi
|
|
}
|
|
|
|
#CHECK FOR FUNCTIONS SCRIPT
|
|
chk_libs(){
|
|
if [ -f lib/logic.sh ];then
|
|
source lib/logic.sh
|
|
|
|
|
|
else
|
|
echo -e "\e[1;31mERROR: logic.lib not found, report bugs to https://github.com/silvernode/zymp3/issues \e[0m"
|
|
zenity --error --text "logic.lib not found, report bugs to: https://github.com/silvernode/zymp3/issues"
|
|
exit 0;
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
#RUN CHECKS AND OPEN THE MAIN WINDOW
|
|
main(){
|
|
while true;do
|
|
chk_conf
|
|
chk_libs
|
|
gui
|
|
done
|
|
|
|
}
|
|
|
|
main
|
|
|