#!/bin/bash #field guide if [ "${2}" == "" ]; then name=`basename "${1}"` bash position.sh set ax guides/guide_all.svg number=`mktemp`.svg node ./numbers/ -n "${name}" -o "${number}" ax "${number}" rm -f "${number}" bash position.sh reset echo "Are you ready to continue? (yes/no)" read input if [ "$input" != "n" ] && [ "$input" != "no" ] then echo "Starting with first frame..." else exit 1 fi fi i=0 #files in dir for svg in "${1}"*.svg ; do let "i=i+1" if [ "${2}" != "" ] && [ "${i}" != "${2}" ]; then continue fi filename=`basename "${svg}"` name=`echo "${filename}" | cut -d'.' -f1` num=`echo "${name}" | awk -F'_' '{print $(NF)}'` echo "Drawing $svg file..." bash position.sh set ax guides/guide_marks.svg number=`mktemp`.svg node ./numbers/ -n "${num}" -o "${number}" ax "${number}" ax "${svg}" rm -f "${number}" bash position.sh reset echo "Are you ready to continue? (yes/no)" read input if [ "$input" != "n" ] && [ "$input" != "no" ] then echo "Continuing with next frame..." else break fi done