refactor(lab): drive docker from python so the cli works on windows and posix without bash

This commit is contained in:
ZSecurity
2026-10-24 14:07:06 +07:00
parent 8366583c43
commit 476b3d2078
8 changed files with 305 additions and 54 deletions
+7 -2
View File
@@ -1,4 +1,9 @@
#!/usr/bin/env bash
set -eu
docker rm -f "${NAME:-p2s-lab}" >/dev/null 2>&1 || true
echo "down"
HERE=$(cd "$(dirname "$0")" && pwd)
cd "$HERE/.."
PY=${PYTHON:-}
if [ -z "$PY" ]; then
if command -v python >/dev/null 2>&1; then PY=python; else PY=python3; fi
fi
exec "$PY" -m poc lab --down "$@"