diff --git a/tools/db/import-md5-list b/tools/db/import-md5-list index adca8a6..497ae4c 100644 --- a/tools/db/import-md5-list +++ b/tools/db/import-md5-list @@ -38,7 +38,7 @@ function help() { echo " -ed export md5 of deleted fiels" echo "" echo " moviedir: Is optional if it is already in the global config" - + exit 0 } if [ "$mode" == "help" ] && help @@ -80,7 +80,12 @@ function md5_out_del() { # db_query -> result function db_query() { - echo $@ | mysql -h$dbhost -u$dbuser -p$dbpwd $dbname + local args="-sN" #no headers, no grid + args+=" -h$dbhost" + args+=" -u$dbuser" + [ -n "$dbpwd" ] && args+=" -p$dbpwd" + args+=" $dbname" + echo $@ | mysql $args } # db_exist_md5 -> true/false 0/1 @@ -116,4 +121,4 @@ case "$mode" in echo "" help ;; -esac \ No newline at end of file +esac