[print_imageid_du] Attempt at fixing "dc: stack empty" message when no tracks are selected

This commit is contained in:
ayakael 2018-05-15 23:28:13 -07:00
parent 71753962bd
commit b9f882d5d1
No known key found for this signature in database
GPG key ID: 575626A4AE5F4026

View file

@ -15,5 +15,6 @@ print_imageid_du() {
local imageidList=(${@})
[[ -z "${imageidList[@]}" ]] && echo 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[@]}" ]] && echo 0
dc <<< '[+]sa[z2!>az2!>b]sb'"$(sed 's/"//g' <<< "${bytesList[@]}")lbxp"
}