summaryrefslogtreecommitdiffstats
path: root/dundundun.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dundundun.sh')
-rwxr-xr-xdundundun.sh27
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
13rm -f export_tmp/* 13rm -f export_tmp/*
14 14
15 15
16inkscape -z -e "export_tmp/1.png" `printf "%s1.svg" $SOURCEBASE` 16inkscape -z -e "export_tmp/1_raw.png" `printf "%s1.svg" $SOURCEBASE`
17inkscape -z -e "export_tmp/2.png" `printf "%s2.svg" $SOURCEBASE` 17inkscape -z -e "export_tmp/2_raw.png" `printf "%s2.svg" $SOURCEBASE`
18inkscape -z -e "export_tmp/3.png" `printf "%s3.svg" $SOURCEBASE` 18inkscape -z -e "export_tmp/3_raw.png" `printf "%s3.svg" $SOURCEBASE`
19inkscape -z -e "export_tmp/4.png" `printf "%s4.svg" $SOURCEBASE` 19inkscape -z -e "export_tmp/4_raw.png" `printf "%s4.svg" $SOURCEBASE`
20 20
21counter=5 21counter=5
22NUMPROCS=8 22NUMPROCS=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
36wait -n 36wait -n
37 37
38 38
39counter=1
40while [ $counter -le 79 ]
41do
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++))
49done
50
51wait -n
52
53
39declare -a args 54declare -a args
40args+=(export_tmp/1.png 50:50) 55args+=(export_tmp/1.png 50:50)
41args+=(export_tmp/2.png 12:50) 56args+=(export_tmp/2.png 12:50)
@@ -50,4 +65,4 @@ do
50done 65done
51 66
52apngasm -o $TARGETSVG ${args[@]} 67apngasm -o $TARGETSVG ${args[@]}
53rm -f export_tmp/* 68#rm -f export_tmp/*