26 lines
397 B
Bash
Executable File
26 lines
397 B
Bash
Executable File
#! /bin/sh
|
|
|
|
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)/..
|
|
|
|
cat $1 | jq -r ".parameterSets | keys | .[]" \
|
|
| while read param; do
|
|
run openscad -o "chip-${param}.stl" -p "$basedir/$1" -P "${param}" chip.scad
|
|
done
|