zymp3 being in src didn't make sense

This commit is contained in:
Justin Moore
2015-02-19 03:31:39 -06:00
parent eb90304b17
commit 35f4f014f1
Executable
+59
View File
@@ -0,0 +1,59 @@
#!/bin/bash
##############################################
# Title: Zymp3 v0.1-5
# Description: Convert youtube video to mp3
# Author: Justin Moore
# Created: Oct 12, 2011
# Updated: Jan 16, 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 in two locations
chk_conf(){
if [ -f ~/.config/Zymp3/zymp3.conf ];then
source ~/.config/Zymp3/zymp3.conf
elif [ -f config/zymp3.conf ];then
source config/zymp3.conf
else
echo -e "\e[1;31mERROR: No config file in $HOME/.config/Zymp3/ or /config/ \e[0m"
zenity --error --text "No config file in $HOME/.config/Zymp3/ or /config"
exit 0;
fi
}
chk_libs(){
if [ -f lib/logic.lib ];then
source lib/logic.lib
else
echo -e "\e[1;31mERROR: No libraries file found in ../libs \e[0m"
zenity --error --text "No libraries file found in ../libs"
exit 0;
fi
}
#call the main gui
main(){
while true;do
chk_conf
chk_libs
gui
done
}
main