From 4b4b45e2b1bd8b8faf13e63c343a6b9a0f254e91 Mon Sep 17 00:00:00 2001 From: 6543 Date: Thu, 7 Feb 2019 22:23:19 +0100 Subject: [PATCH] use logick (true=1; false=0;) --- tools/db/import-md5-list | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/db/import-md5-list b/tools/db/import-md5-list index 6eccad3..ab40c54 100644 --- a/tools/db/import-md5-list +++ b/tools/db/import-md5-list @@ -14,6 +14,11 @@ # $2: # [$3]: +{ #set enviroemnt + true=1 #like + false=0 #like +} + mode=$(echo $1 | tr -d '-') md5="$2" moviedir="$3" @@ -93,10 +98,10 @@ 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 + return $true else echo false - return 1 + return $false fi }