#!/usr/bin/env sh set -eu script_dir=$(CDPATH= cd "$(dirname "$0")" && pwd) repo_root=$(CDPATH= cd "$script_dir/.." && pwd) if [ -n "${CARD_LAYOUTS_ROOT:-}" ]; then layouts_root=$CARD_LAYOUTS_ROOT else layouts_root=$repo_root/../../../tools/card-layouts fi renderer=$layouts_root/tools/render_card.py if [ ! -f "$renderer" ]; then echo "Nie znaleziono generatora card-layouts: $renderer" >&2 echo "Ustaw CARD_LAYOUTS_ROOT na checkout edu-tools/card-layouts." >&2 exit 1 fi exec python3 "$renderer" "$repo_root" "$@"