Loop work

This commit is contained in:
Matt McWilliams 2021-08-07 12:14:59 -04:00
parent e646abe77e
commit 86f22d8ac5
1 changed files with 36 additions and 0 deletions

36
loop.sh Normal file
View File

@ -0,0 +1,36 @@
#!/bin/bash
#field guide
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
#files in dir
for svg in "${1}"*.svg ; do
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}"
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