From cffc6dedfbb9a051149fa1cd69d6c456a445e2a4 Mon Sep 17 00:00:00 2001 From: mattmcw Date: Sun, 28 Nov 2021 22:00:10 -0500 Subject: [PATCH] Add a stop frame --- draw.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/draw.sh b/draw.sh index 67cb89c..4e87bd9 100644 --- a/draw.sh +++ b/draw.sh @@ -15,7 +15,12 @@ if [[ "${1}" == "" ]]; then exit 1 fi -if [ "${2}" == "" ]; then +END=-1 +if [[ "${3}" != "" ]]; then + END=${3} +fi + +if [[ "${2}" == "" ]] && [[ $2 -eq 0 ]]; then name=`basename "${1}"` bash field.sh "${name}" @@ -54,6 +59,11 @@ for svg in "${1}"*.svg ; do rm -f "${number}" bash position.sh reset + if [[ $END -gt -1 ]] && [[ $END -eq $i ]]; then + echo "Reached final frame $i, exiting..." + exit + fi + askContinue "Continuing with next frame..." done