make-drs-batch.sh depends on file globbing to generate the sequence for files:
for f in $v/* ; do
# cp and rename each image
fullNm=$(basename $f)
ext="${fullNm##*.}"
# jsk: 12.21.17: Issue #14
if $(isBannedExt ${ext} ) ; then continue ; fi
fnm="${fullNm%.$ext}"
# WRONG: suffix=$(printf %04d $pageSeq)
# This transform makes the file name comply with PDS sequencing
destNm="$pdsName--${fnm}__${suffix}.$ext"
cp $f $templateDir/$destNm
pageSeq=$[pageSeq + 1]
done
$fnm is usally Wxxxxx-IyyyyyNNNN. We want to use NNNN as the sequence. This would remove the dependency that all the files in the directory ($v/*) have identical file names. (They may be required, for other reasons, but not for this one.)
have suffix be the last 4 numeric characters in fnm, formatted into 000n
make-drs-batch.sh
depends on file globbing to generate the sequence for files:$fnm is usally Wxxxxx-IyyyyyNNNN. We want to use NNNN as the sequence. This would remove the dependency that all the files in the directory ($v/*) have identical file names. (They may be required, for other reasons, but not for this one.) have suffix be the last 4 numeric characters in fnm, formatted into 000n