diff --git a/draw.sh b/draw.sh index 7449c81..eccbfba 100644 --- a/draw.sh +++ b/draw.sh @@ -15,6 +15,8 @@ if [[ "${1}" == "" ]]; then exit 1 fi +FRAMES=$(fullpath)/ + END=-1 if [[ "${3}" != "" ]]; then END=${3} @@ -28,14 +30,12 @@ if [[ "${2}" == "" ]] || [[ $2 -eq 0 ]]; then askContinue "Start with first frame?" "Starting with first frame..." else c=0 - for svg in "${1}"*.svg ; do + for svg in "${FRAMES}"*.svg ; do if [[ ${c} -lt ${2} ]]; then - echo $c c=$((c+1)) continue fi filename=`basename "${svg}"` - echo "Starting frame: ${filename}" break done askContinue "Start with ${filename}" "Continuing with frame ${filename}..." @@ -43,7 +43,7 @@ fi i=0 #files in dir -for svg in "${1}"*.svg ; do +for svg in "${FRAMES}"*.svg ; do if [[ "${2}" != "" ]] && [[ ${2} -ne 0 ]] && [[ ${i} -lt ${2} ]]; then i=$((i+1)) continue