Files
2026-08-20 06:17:39 +08:00

19 lines
494 B
Bash
Executable File

#!/bin/bash
# haltcl needs the Tcl HAL extension (tcl/hal.so), which is only built
# in GUI builds (BUILD_GUI); skip in headless builds. The tcl dir is
# taken from TCLLIBPATH (exported by rip-environment).
set -u
if ! command -v tclsh >/dev/null 2>&1; then
echo "skip: tclsh not installed" >&2
exit 1
fi
read -r tcldir _ <<< "${TCLLIBPATH:-}"
if ! [ -f "${tcldir:-/nonexistent}/hal.so" ]; then
echo "skip: Tcl HAL extension not built (headless build)" >&2
exit 1
fi
exit 0