Files
BoardGameInlets/.helperHerosKeepOut.sh
2026-04-07 10:17:39 +02:00

25 lines
743 B
Bash
Executable File

OPENSCAD="openscad"
SCAD_FILE="./CardHolder.scad"
FOLDER=STL/HeroesKeepOut
mkdir -p STL
mkdir -p $FOLDER
# ── Cards ─────────────────────────────────────────────────────────────
while IFS=',' read -r b t h name; do
# Remove quotes around name, replace spaces with -
label=$(printf '%s' "$name" | sed 's/"//g; s/ /-/g')
output="$FOLDER/Cards-$label.stl"
echo "Rendering $output..."
"$OPENSCAD" \
-D "b=$b" \
-D "t=$t" \
-D "h=$h" \
-D "name=\"$name\"" \
-o "$output" "$SCAD_FILE"
done <./HeroesKeepOut/cardConfigs.txt
echo "Rendering $output..."
"$OPENSCAD" -o "$output" "$SCAD_FILE"