-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcleanup.sh
More file actions
executable file
·54 lines (46 loc) · 981 Bytes
/
Copy pathcleanup.sh
File metadata and controls
executable file
·54 lines (46 loc) · 981 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
# BotScanner SVN cleanup script
# Ensures deterministic, audit-transparent working copy hygiene
set -e
echo "=== BotScanner SVN Cleanup ==="
# Step 1: Remove already-versioned junk but keep local copies
for path in __pycache__ .venv venv .vscode .idea Logs dist build *.egg-info; do
if svn info "$path" >/dev/null 2>&1; then
echo "Untracking $path from SVN..."
svn delete --keep-local "$path" || true
fi
done
# Step 2: Apply ignore rules
cat > ignore-list.txt <<'EOF'
__pycache__/
*.pyc
*.pyo
*.pyd
venv/
.venv/
env/
.vscode/
.idea/
*.swp
.DS_Store
Thumbs.db
Logs/
*.log
tmp/
*.tmp
.mypy_cache/
.pytest_cache/
dist/
build/
*.egg-info/
.svn/
.env
EOF
echo "Applying svn:ignore..."
svn propset svn:ignore -F ignore-list.txt .
# Step 3: Commit property change
svn commit -m "Cleanup BotScanner repo: remove junk, set svn:ignore"
# Step 4: Verify
echo "=== SVN Status After Cleanup ==="
svn status
echo "Cleanup complete. Repo is now audit-transparent."