[export_mv] Now exits with error if move wasn't successful
This commit is contained in:
parent
41fad1e66c
commit
6f4b82b3b4
1 changed files with 2 additions and 1 deletions
|
@ -20,8 +20,9 @@ export_mv() {
|
||||||
local COUNT=1
|
local COUNT=1
|
||||||
for trackid in ${trackidList[@]}; do
|
for trackid in ${trackidList[@]}; do
|
||||||
mv "${GITDIR}/$(printf 'split-track%02d.flac' ${COUNT})" "${GITDIR}/${IMAGEID}-${trackid}.flac"
|
mv "${GITDIR}/$(printf 'split-track%02d.flac' ${COUNT})" "${GITDIR}/${IMAGEID}-${trackid}.flac"
|
||||||
|
[[ $? -ne 0 ]]; local ERROR=true
|
||||||
local COUNT=$(( ${COUNT} + 1 ))
|
local COUNT=$(( ${COUNT} + 1 ))
|
||||||
done
|
done
|
||||||
return 0
|
[[ "${ERROR}" == "true" ]] && return 1 || return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue