Spaces:
Running
Running
Download mirror/scripts/scan.sh from RedinGhost/skill-security-guard: direct link, hf CLI and curl.
- Browser
- Download file 526 Bytes
-
https://huggingface.co/spaces/RedinGhost/skill-security-guard/resolve/main/mirror/scripts/scan.sh
- Command line
-
hf download hf://spaces/RedinGhost/skill-security-guard/mirror/scripts/scan.sh
-
curl -L -o scan.sh https://huggingface.co/spaces/RedinGhost/skill-security-guard/resolve/main/mirror/scripts/scan.sh
526 Bytes
| # skill-security-guard: portable shell wrapper around scripts/scan.py | |
| set -euo pipefail | |
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | |
| find_python() { | |
| for candidate in python3 python; do | |
| if command -v "$candidate" >/dev/null 2>&1 && "$candidate" -c "import sys" >/dev/null 2>&1; then | |
| echo "$candidate" | |
| return 0 | |
| fi | |
| done | |
| return 1 | |
| } | |
| PYTHON_BIN="$(find_python)" || { | |
| echo "error: python3 or python is required" >&2 | |
| exit 127 | |
| } | |
| exec "$PYTHON_BIN" "$SCRIPT_DIR/scan.py" "$@" | |