You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
575 B

#!/bin/sh
SOURCEBASE=$1
MAX=$2
DELAY=$3
SOURCESVG=`printf "%s.svg" $SOURCEBASE`
TARGETSVG=`printf "export/%s.png" $SOURCEBASE`
mkdir -p export_tmp
rm -f export_tmp/*
counter=1
while [ $counter -le $MAX ]
do
source=`printf "%s%s.svg" $SOURCEBASE $counter`
file=`printf "export_tmp/%s.png" $counter`
inkscape -z -e $file $source
((counter++))
done
declare -a args
counter=1
while [ $counter -le $MAX ]
do
file=`printf "export_tmp/%s.png" $counter`
args+=($file $DELAY)
((counter++))
done
apngasm -o $TARGETSVG ${args[@]}
rm -f export_tmp/*