From c1ae9a9d7da1797417d2c81c16579f6eb75e0ff4 Mon Sep 17 00:00:00 2001 From: mattmcw Date: Fri, 15 Oct 2021 12:13:08 -0400 Subject: [PATCH] Only build step files and prerequisites for the spiral and only when STEP is true --- scripts/v3.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/scripts/v3.sh b/scripts/v3.sh index 5909d9c..038817b 100644 --- a/scripts/v3.sh +++ b/scripts/v3.sh @@ -1,6 +1,8 @@ #!/bin/bash V="v3" +# Commit changes before running this build script + echo "Rendering GNAL ${V}" bash ./scripts/deps.sh @@ -95,15 +97,17 @@ render_part () { echo "$line" fi - start=`date +%s` - if [[ "${SIZE}" == "100ft" ]]; then - openscad --csglimit=20000000 -o "$csg" -D "PART=\"${FILE}\"" -D "FN=800" "${scad}" - else - openscad --csglimit=10000000 -o "$csg" -D "PART=\"${FILE}\"" -D "FN=600" "${scad}" + if [ ${STEP} = true ] && [[ "${FILE}" == "spiral" ]]; then + start=`date +%s` + if [[ "${SIZE}" == "100ft" ]]; then + openscad --csglimit=20000000 -o "$csg" -D "PART=\"${FILE}\"" -D "FN=800" "${scad}" + else + openscad --csglimit=10000000 -o "$csg" -D "PART=\"${FILE}\"" -D "FN=600" "${scad}" + fi + end=`date +%s` + runtime=$((end-start)) + echo "Compiling CSG took ${runtime}sec" fi - - end=`date +%s` - runtime=$((end-start)) echo "Rendering image of ${stl}..."