summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2017-10-22 17:40:30 +0200
committerH. Peter Anvin <hpa@zytor.com>2017-10-22 17:40:30 +0200
commit1fc2f8c10d5b98a8ca99e2a102f72a8ee7132609 (patch)
tree25bb879c2a6a08427d6a8b74dd88af7430ae81a3
parentfb09ec9360ac7e9631155f78a6c4d3f3d8a34aeb (diff)
parent1a7360c9aef6cf0aa536d8b9be583616867c1a53 (diff)
downloadballot-1fc2f8c10d5b98a8ca99e2a102f72a8ee7132609.tar.gz
ballot-1fc2f8c10d5b98a8ca99e2a102f72a8ee7132609.tar.xz
ballot-1fc2f8c10d5b98a8ca99e2a102f72a8ee7132609.zip
Merge remote-tracking branch 'refs/remotes/origin/master'
-rwxr-xr-xmkballots.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/mkballots.sh b/mkballots.sh
index d7b8b8d..c4730c7 100755
--- a/mkballots.sh
+++ b/mkballots.sh
@@ -63,12 +63,13 @@ pdflatex scoresheets.tex && pdflatex scoresheets.tex
cd ..
bdigits=$(echo -n $((nbatch)) | wc -c)
start=1
+genids.pl "$prefix" $((nbatch*perbatch)) $start | $shuf | \
+ split -a $bdigits --numeric-suffixes=1 -l $perbatch \
+ --additional-suffix='.list' - "$proj"/id
+
for (( batch=1 ; batch <= nbatch ; batch++ )); do
bname=$(printf "%0${bdigits}d" $batch)
- ids="$proj"/id${bname}.list
- genids.pl "$prefix" $perbatch $start $((nbatch*perbatch)) > "$ids"
- $sdaps stamp -f "$ids" -o "$proj"/ballots_${bname}.pdf
- start=$((start + perbatch))
+ $sdaps stamp -f "$proj"/id${bname}.list -o "$proj"/ballots_${bname}.pdf
done
# Make a backup copy of the project directory
tar cvvfJ "$proj".sdaps.tar.xz "$proj" "$template" \