use <stdbool.h> logick (true=1; false=0;)
This commit is contained in:
parent
00bcaff33d
commit
4b4b45e2b1
@ -14,6 +14,11 @@
|
|||||||
# $2: <paht of md5-file>
|
# $2: <paht of md5-file>
|
||||||
# [$3]: <path to movie folder>
|
# [$3]: <path to movie folder>
|
||||||
|
|
||||||
|
{ #set enviroemnt
|
||||||
|
true=1 #like <stdbool.h>
|
||||||
|
false=0 #like <stdbool.h>
|
||||||
|
}
|
||||||
|
|
||||||
mode=$(echo $1 | tr -d '-')
|
mode=$(echo $1 | tr -d '-')
|
||||||
md5="$2"
|
md5="$2"
|
||||||
moviedir="$3"
|
moviedir="$3"
|
||||||
@ -93,10 +98,10 @@ function db_exist_md5() {
|
|||||||
result=($(db_query "SELECT COUNT(md5) FROM File WHERE File.MD5 LIKE '$1';"))
|
result=($(db_query "SELECT COUNT(md5) FROM File WHERE File.MD5 LIKE '$1';"))
|
||||||
if [ "${result[2]}" -gt "0" ]; then
|
if [ "${result[2]}" -gt "0" ]; then
|
||||||
echo true
|
echo true
|
||||||
return 0
|
return $true
|
||||||
else
|
else
|
||||||
echo false
|
echo false
|
||||||
return 1
|
return $false
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user