poker-chips/build/build.sh

26 lines
397 B
Bash
Raw Normal View History

#! /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 "=== $*"
"$@"
}
2022-08-30 10:17:10 -06:00
basedir=$(dirname $0)/..
2022-08-30 10:14:50 -06:00
cat $1 | jq -r ".parameterSets | keys | .[]" \
| while read param; do
2022-08-30 10:17:10 -06:00
run openscad -o "chip-${param}.stl" -p "$basedir/$1" -P "${param}" chip.scad
2022-08-30 10:14:50 -06:00
done