diff options
Diffstat (limited to 'dundundun.sh')
-rwxr-xr-x | dundundun.sh | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/dundundun.sh b/dundundun.sh index 7a63ea4..fc9b48d 100755 --- a/dundundun.sh +++ b/dundundun.sh | |||
@@ -13,10 +13,10 @@ 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.svg" $SOURCEBASE` | 16 | inkscape -z -e "export_tmp/1_raw.png" `printf "%s1.svg" $SOURCEBASE` |
17 | inkscape -z -e "export_tmp/2.png" `printf "%s2.svg" $SOURCEBASE` | 17 | inkscape -z -e "export_tmp/2_raw.png" `printf "%s2.svg" $SOURCEBASE` |
18 | inkscape -z -e "export_tmp/3.png" `printf "%s3.svg" $SOURCEBASE` | 18 | inkscape -z -e "export_tmp/3_raw.png" `printf "%s3.svg" $SOURCEBASE` |
19 | inkscape -z -e "export_tmp/4.png" `printf "%s4.svg" $SOURCEBASE` | 19 | inkscape -z -e "export_tmp/4_raw.png" `printf "%s4.svg" $SOURCEBASE` |
20 | 20 | ||
21 | counter=5 | 21 | counter=5 |
22 | NUMPROCS=8 | 22 | NUMPROCS=8 |
@@ -27,7 +27,7 @@ do | |||
27 | wait -n | 27 | wait -n |
28 | done | 28 | done |
29 | offset=${shakeOffsets[counter-5]} | 29 | offset=${shakeOffsets[counter-5]} |
30 | file=`printf "export_tmp/%s.png" $counter` | 30 | file=`printf "export_tmp/%s_raw.png" $counter` |
31 | source=`printf "%s4.svg" $SOURCEBASE` | 31 | source=`printf "%s4.svg" $SOURCEBASE` |
32 | inkscape -z -e $file -a $offset $source & | 32 | inkscape -z -e $file -a $offset $source & |
33 | ((counter++)) | 33 | ((counter++)) |
@@ -36,6 +36,21 @@ done | |||
36 | wait -n | 36 | wait -n |
37 | 37 | ||
38 | 38 | ||
39 | counter=1 | ||
40 | while [ $counter -le 79 ] | ||
41 | do | ||
42 | while (( ${NUMJOBS@P} >= NUMPROCS )); do | ||
43 | wait -n | ||
44 | done | ||
45 | file=`printf "export_tmp/%s.png" $counter` | ||
46 | source=`printf "export_tmp/%s_raw.png" $counter` | ||
47 | pngquant -o $file $source & | ||
48 | ((counter++)) | ||
49 | done | ||
50 | |||
51 | wait -n | ||
52 | |||
53 | |||
39 | declare -a args | 54 | declare -a args |
40 | args+=(export_tmp/1.png 50:50) | 55 | args+=(export_tmp/1.png 50:50) |
41 | args+=(export_tmp/2.png 12:50) | 56 | args+=(export_tmp/2.png 12:50) |
@@ -50,4 +65,4 @@ do | |||
50 | done | 65 | done |
51 | 66 | ||
52 | apngasm -o $TARGETSVG ${args[@]} | 67 | apngasm -o $TARGETSVG ${args[@]} |
53 | rm -f export_tmp/* | 68 | #rm -f export_tmp/* |