Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/healer-pro-pack / scripts/normalize_line_endings_and_pycheck.sh |
| Date | Not specified in source |
| Repository | Janady13/healer-pro-pack |
| Revision | 8cd241e17bd004fdbdc1ee5e9913e45304671553 |
| Branch | main |
| Path or archive member | scripts/normalize_line_endings_and_pycheck.sh |
| Original SHA-256 | 86bb9c3a99b85236a6cdc4fedb136e09a51d83a53960bba16c10ac69f9a19561 |
| Git blob SHA | 96b29af3396e34cb0d90e36cdea038a1ca6b318d |
| Reading-copy SHA-256 | 86bb9c3a99b85236a6cdc4fedb136e09a51d83a53960bba16c10ac69f9a19561 |
Recovered source transcript
Download complete source text ↓24 lines · 0.6 KB
#!/bin/bash
set -euo pipefail
TARGET="${1:-$PWD}"
echo "↩️ Normalizing line endings and checking Python syntax in $TARGET"
# Normalize CRLF=>LF without extra deps
grep -Irl $'\r' "$TARGET" | while read -r f; do
perl -pi -e 's/\r\n/\n/g' "$f"
done
echo "🧪 Python syntax check (py_compile)..."
python3 - <<'PY'
import os, py_compile
base = os.environ.get("TARGET",".")
errs=0
for root,_,files in os.walk(base):
for fn in files:
if fn.endswith(".py"):
p=os.path.join(root,fn)
try: py_compile.compile(p,doraise=True)
except Exception as e:
print(f"❌ {p}: {e}"); errs+=1
if errs: exit(2)
print("✅ Python syntax OK")
PY