beautify
This commit is contained in:
parent
ba3ac3b276
commit
00bcaff33d
@ -48,7 +48,7 @@ if [ "$mode" == "help" ] && help
|
||||
[ -z "$moviedir" ] && [ -f "$globalconf" ] && { # if (no argument) and (globalconf exist)
|
||||
if [ -z "$(grep "moviedir=" "$globalconf" )" ]; then # and (moviedir is NOT in globalconf)
|
||||
echo 'neither "movie folder" is set in global config nor given as argument'
|
||||
exit 2
|
||||
exit 2
|
||||
else # and (moviedir is in globalconf)
|
||||
moviedir="$(grep "moviedir=" "$globalconf" | cut -d '=' -f 2)"
|
||||
fi
|
||||
@ -57,23 +57,23 @@ if [ "$mode" == "help" ] && help
|
||||
|
||||
## functions
|
||||
function md5_in_add() {
|
||||
exit 0
|
||||
exit 0
|
||||
}
|
||||
|
||||
function md5_rm() {
|
||||
exit 0
|
||||
exit 0
|
||||
}
|
||||
|
||||
function md5_in_del() {
|
||||
exit 0
|
||||
exit 0
|
||||
}
|
||||
|
||||
function md5_out_exist() {
|
||||
exit 0
|
||||
exit 0
|
||||
}
|
||||
|
||||
function md5_out_del() {
|
||||
exit 0
|
||||
exit 0
|
||||
}
|
||||
|
||||
# help functions
|
||||
@ -90,14 +90,14 @@ function db_query() {
|
||||
|
||||
# db_exist_md5 <md5> -> true/false 0/1
|
||||
function db_exist_md5() {
|
||||
result=($(db_query "SELECT COUNT(md5) FROM File WHERE File.MD5 LIKE '$1';"))
|
||||
if [ "${result[2]}" -gt "0" ]; then
|
||||
echo true
|
||||
return 0
|
||||
else
|
||||
echo false
|
||||
return 1
|
||||
fi
|
||||
result=($(db_query "SELECT COUNT(md5) FROM File WHERE File.MD5 LIKE '$1';"))
|
||||
if [ "${result[2]}" -gt "0" ]; then
|
||||
echo true
|
||||
return 0
|
||||
else
|
||||
echo false
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
case "$mode" in
|
||||
@ -118,7 +118,7 @@ case "$mode" in
|
||||
;;
|
||||
*)
|
||||
echo "wrong arguments"
|
||||
echo ""
|
||||
help
|
||||
echo ""
|
||||
help
|
||||
;;
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user