fix bug at tools/db/import-md5-list

This commit is contained in:
6543 2019-02-08 14:29:50 +01:00
parent 30e26c1626
commit 27f2792b10

View File

@ -53,10 +53,10 @@ function help() {


exit 0 exit 0
} }
if [ "$mode" == "help" ] && help [ "$mode" == "help" ] && help


##check & prepair args ##check & prepair args
[ ${mode:0:1} == "e" ] && touch "$md5" [ "${mode:0:1}" == "e" ] && touch "$md5"
[ -f "$md5" ] || { echo "md5 \"$md5\" do not exist"; exit 1; } # check md5 [ -f "$md5" ] || { echo "md5 \"$md5\" do not exist"; exit 1; } # check md5
[ -z "$moviedir" ] && [ -f "$globalconf" ] && { # if (no argument) and (globalconf exist) [ -z "$moviedir" ] && [ -f "$globalconf" ] && { # if (no argument) and (globalconf exist)
if [ -z "$(grep "moviedir=" "$globalconf" )" ]; then # and (moviedir is NOT in globalconf) if [ -z "$(grep "moviedir=" "$globalconf" )" ]; then # and (moviedir is NOT in globalconf)