Files
crm/tools/configurator-sync.sh

16 lines
826 B
Bash
Executable File

#!/bin/sh
# Kopieert de 3D-engine van de Tectum-configurator (../configurator) naar static/configurator/, voor de
# viewer van gekozen modellen (templates/viewer.html, static/viewer.js). Zelfde werkwijze als
# tools/configurator-sync.sh van de website; alleen wat de engine nodig heeft (js, assets, kosten).
# Gebruik: tools/configurator-sync.sh [pad-naar-configurator] [doelmap]
cd "$(dirname "$0")/.." || exit 1
SRC="${1:-../configurator}"
DEST="${2:-static/configurator}"
[ -f "$SRC/js/house/house-model.js" ] || { echo "Geen configurator gevonden in $SRC" >&2; exit 1; }
mkdir -p "$DEST"
rsync -a --delete \
--include='/LICENTIE.md' --include='/assets/***' --include='/js/***' --include='/kosten/***' \
--exclude='*' \
"$SRC/" "$DEST/"
echo "Configurator-engine gekopieerd naar $DEST/ ($(du -sh "$DEST" | cut -f1))"