MV Func file_size()
This commit is contained in:
parent
a3a49da9b9
commit
5d6f5ac760
@ -12,3 +12,12 @@ LIBVER=1.1
|
||||
readonly globalconf="/etc/tt/global"
|
||||
[ -z "$DEBUG" ] && readonly DEBUG=$FALSE
|
||||
}
|
||||
|
||||
# file_size <path> -> (du -b)/1024 [Kb]
|
||||
function file_size() {
|
||||
if [ -f "$1" ]; then
|
||||
echo $(($(du -b "$1" | cut -f 1)/1024))
|
||||
else
|
||||
echo 0
|
||||
fi
|
||||
}
|
||||
|
@ -144,15 +144,6 @@ function db_query() {
|
||||
echo $@ | mysql $args
|
||||
}
|
||||
|
||||
# file_size <path> -> (du -b)/1024 [Kb]
|
||||
function file_size() {
|
||||
if [ -f "$1" ]; then
|
||||
echo $(($(du -b "$1" | cut -f 1)/1024))
|
||||
else
|
||||
echo 0
|
||||
fi
|
||||
}
|
||||
|
||||
case "$mode" in
|
||||
"a") #in_add
|
||||
md5_in_add
|
||||
|
@ -147,16 +147,6 @@ function main() {
|
||||
moviedir=""$(echo $moviedir | sed 's|/$||g')""
|
||||
[ -z "$moviedir" ] && exit 255 #catch case moviedir="/"
|
||||
|
||||
|
||||
# file_size <path> -> (du -b)/1024 [Kb]
|
||||
function file_size() {
|
||||
if [ -f "$1" ]; then
|
||||
echo $(($(du -b "$1" | cut -f 1)/1024))
|
||||
else
|
||||
echo 0
|
||||
fi
|
||||
}
|
||||
|
||||
# file_add [rel.path] (md5)
|
||||
function file_add() {
|
||||
local MD5="$2"
|
||||
|
Loading…
Reference in New Issue
Block a user