[print_imageid_du] Function exits gracefully when no imageids are present
This commit is contained in:
parent
d06aa7beb6
commit
2d4c714ba2
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@
|
|||
print_imageid_du() {
|
||||
local GIT_DIR="${1}"; shift
|
||||
local imageidList=(${@})
|
||||
[[ -z "${imageidList[@]}" ]] && echo 0
|
||||
[[ -z "${imageidList[@]}" ]] && return 0
|
||||
local bytesList=($(awk 'BEGIN{RS=",";FS=":"}{if($1=="\"size\""){print $2}}' <<<$(git -C "${GIT_DIR}" annex info --bytes --json $(printf "%s.flac\t" ${imageidList[@]}))))
|
||||
[[ -z "${bytesList[@]}" ]] && return 0
|
||||
dc <<< '[+]sa[z2!>az2!>b]sb'"$(sed 's/"//g' <<< "${bytesList[@]}")lbxp"
|
||||
|
|
Loading…
Reference in a new issue