-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathc2c-init
More file actions
executable file
·27 lines (22 loc) · 837 Bytes
/
Copy pathc2c-init
File metadata and controls
executable file
·27 lines (22 loc) · 837 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env bash
# DEPRECATED (B123): Python root wrapper retired. Prefer the OCaml `c2c` binary.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
REPLACEMENT='c2c init'
LEGACY_NOTE='Legacy Python path (escape hatch only): python3 c2c_init.py …'
if [ "${C2C_ALLOW_PYTHON_LEGACY:-}" = "1" ] || [ -n "${PYTEST_CURRENT_TEST:-}" ]; then
echo "warning: $(basename "$0") is a retired Python wrapper (B123); C2C_ALLOW_PYTHON_LEGACY=1 allows tests/emergency only." >&2
exec python3 "$SCRIPT_DIR/c2c_init.py" "$@"
fi
cat >&2 <<EOF
error: $(basename "$0") is a retired Python wrapper (B123).
Use the OCaml CLI instead:
$REPLACEMENT
Install the native binary with:
just install-all
# or: c2c install self
$LEGACY_NOTE
Escape hatch (tests/emergency only):
C2C_ALLOW_PYTHON_LEGACY=1 $(basename "$0") …
EOF
exit 2