diff options
Diffstat (limited to 'dundundun.sh')
| -rwxr-xr-x | dundundun.sh | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/dundundun.sh b/dundundun.sh index e3e93e5..7a63ea4 100755 --- a/dundundun.sh +++ b/dundundun.sh | |||
| @@ -13,21 +13,28 @@ mkdir -p export_tmp | |||
| 13 | rm -f export_tmp/* | 13 | rm -f export_tmp/* |
| 14 | 14 | ||
| 15 | 15 | ||
| 16 | inkscape -z -e "export_tmp/1.png" `printf "%s1.png" $SOURCEBASE` | 16 | inkscape -z -e "export_tmp/1.png" `printf "%s1.svg" $SOURCEBASE` |
| 17 | inkscape -z -e "export_tmp/2.png" `printf "%s2.png" $SOURCEBASE` | 17 | inkscape -z -e "export_tmp/2.png" `printf "%s2.svg" $SOURCEBASE` |
| 18 | inkscape -z -e "export_tmp/3.png" `printf "%s3.png" $SOURCEBASE` | 18 | inkscape -z -e "export_tmp/3.png" `printf "%s3.svg" $SOURCEBASE` |
| 19 | inkscape -z -e "export_tmp/4.png" `printf "%s4.png" $SOURCEBASE` | 19 | inkscape -z -e "export_tmp/4.png" `printf "%s4.svg" $SOURCEBASE` |
| 20 | 20 | ||
| 21 | counter=5 | 21 | counter=5 |
| 22 | NUMPROCS=8 | ||
| 23 | NUMJOBS="\j" | ||
| 22 | while [ $counter -le 79 ] | 24 | while [ $counter -le 79 ] |
| 23 | do | 25 | do |
| 26 | while (( ${NUMJOBS@P} >= NUMPROCS )); do | ||
| 27 | wait -n | ||
| 28 | done | ||
| 24 | offset=${shakeOffsets[counter-5]} | 29 | offset=${shakeOffsets[counter-5]} |
| 25 | file=`printf "export_tmp/%s.png" $counter` | 30 | file=`printf "export_tmp/%s.png" $counter` |
| 26 | source=`printf "%s4.png" $SOURCEBASE` | 31 | source=`printf "%s4.svg" $SOURCEBASE` |
| 27 | inkscape -z -e $file -a $offset $source | 32 | inkscape -z -e $file -a $offset $source & |
| 28 | ((counter++)) | 33 | ((counter++)) |
| 29 | done | 34 | done |
| 30 | 35 | ||
| 36 | wait -n | ||
| 37 | |||
| 31 | 38 | ||
| 32 | declare -a args | 39 | declare -a args |
| 33 | args+=(export_tmp/1.png 50:50) | 40 | args+=(export_tmp/1.png 50:50) |
