#!/usr/bin/env bash # ================================================================ # SPS_SKEL - Hardwareplanung einlesen (TIA-Import + Positionsdatei) # ================================================================ # Aufruf: # bash bin/hw_import.sh --tia Mubea/mubea-1_TIA.xlsx --positions Mubea/Mubea_positionsconv.json # bash bin/hw_import.sh --tia mubea-1_TIA.xlsx --project Mubea # # TIA-Import und *_positionsconv.json bzw. *_positionsdraw.json werden in # $SKEL_DATA gesucht (auch mit Unterordner, oder als Pfad angegeben). # Ergebnis _hw.json und Bericht _hw.md in $SKEL_RESULTS. # # Weiter: bin/merge_hw_layout.sh --tro _tro.json --hw _hw.json # ================================================================ set -eu SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # Umgebung setzen (SKEL_DATA, SKEL_RESULTS, SKEL_LIB, PYTHONPATH ...) # shellcheck source=/dev/null . "$SCRIPT_DIR/setenv.sh" >/dev/null # Virtuelle Umgebung nutzen, falls vorhanden (pydantic wird benoetigt) if [ -f "$SPS_SKEL/.venv/bin/activate" ]; then # shellcheck source=/dev/null . "$SPS_SKEL/.venv/bin/activate" fi # Python-Interpreter bestimmen PY="python3" command -v python3 >/dev/null 2>&1 || PY="python" exec "$PY" "$SKEL_LIB/hw_import.py" "$@"