From af7d09336beec40041cb7f013c26cc9af1500584 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Sun, 26 Nov 2023 13:04:23 -0700 Subject: [PATCH] Comments in build.sh --- build.sh | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/build.sh b/build.sh index e1caa59..d7f1e17 100755 --- a/build.sh +++ b/build.sh @@ -2,13 +2,19 @@ set -e -builddefs=params.json +# paramsets contains the location of the OpenSCAD parameter sets. +# see https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Customizer#Saving_Parameters_value_in_JSON_file +paramsets=params.json +# run executes a program after printing the commandline to stdout. run () { echo "=== $*" "$@" } +# render turns OpenSCAD echo into 3mf temperature changes. +# +# It does this by kludging together a PrusaSlicer-specific Metadata file. render () { basename=$1; shift run openscad -o $basename "$@" temp-tower.scad 2>&1 | tee $basename.log @@ -28,19 +34,20 @@ render () { rmdir Metadata } +# paramsets lists all defined parameter sets, one per line. paramsets () { - cat $builddefs | jq -r '.parameterSets | keys[] | select(length > 0)' + cat $paramsets | jq -r '.parameterSets | keys[] | select(length > 0)' } case "$1" in -h|-help|--help) cat <