From 00bcaff33df4bb0bbce61c0402d7d99730156d93 Mon Sep 17 00:00:00 2001 From: 6543 Date: Thu, 7 Feb 2019 22:16:45 +0100 Subject: [PATCH] beautify --- tools/db/import-md5-list | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tools/db/import-md5-list b/tools/db/import-md5-list index 497ae4c..6eccad3 100644 --- a/tools/db/import-md5-list +++ b/tools/db/import-md5-list @@ -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 -> 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