2022-08-29 16:46:59 -06:00
|
|
|
#! /bin/sh
|
|
|
|
|
2022-08-30 10:14:50 -06:00
|
|
|
if [ ! -f "$1" ]; then
|
|
|
|
cat <<EOD
|
|
|
|
Usage: $0 PARAMETERS
|
|
|
|
|
|
|
|
Builds everything listed in parameter file PARAMETERS.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
$0 mini-hex.json
|
|
|
|
EOD
|
|
|
|
return
|
|
|
|
fi
|
|
|
|
|
|
|
|
run () {
|
|
|
|
echo "=== $*"
|
|
|
|
"$@"
|
|
|
|
}
|
|
|
|
|
|
|
|
basedir=$(dirname $0)
|
|
|
|
|
|
|
|
mkdir -p build
|
|
|
|
cat $1 | jq -r ".parameterSets | keys | .[]" \
|
2022-08-29 16:46:59 -06:00
|
|
|
| while read param; do
|
2022-08-30 10:14:50 -06:00
|
|
|
run openscad -o "build/chip-${param}.stl" -p "$basedir/$1" -P "${param}" chip.scad
|
|
|
|
done
|