refactor(lab): drive docker from python so the cli works on windows and posix without bash
This commit is contained in:
+7
-2
@@ -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 "$@"
|
||||
|
||||
Reference in New Issue
Block a user