-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcleanup.sh
More file actions
executable file
·80 lines (66 loc) · 2.18 KB
/
cleanup.sh
File metadata and controls
executable file
·80 lines (66 loc) · 2.18 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/bash
# Clean up development artifacts from capa-server and badsign
set -e
echo "==================================="
echo "capa-server Repository Cleanup"
echo "==================================="
echo ""
cd "$(dirname "$0")"
# Remove development test files
echo "Removing development files..."
rm -f test-api.sh
rm -f INSTALL_SUMMARY.txt
echo " Removed test scripts"
# Clean Python cache in app/
echo "Cleaning Python cache..."
find app/ -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
find app/ -type f -name "*.pyc" -delete 2>/dev/null || true
find app/ -type f -name "*.pyo" -delete 2>/dev/null || true
echo " Removed Python cache from app/"
# Clean any .DS_Store or system files
find . -name ".DS_Store" -delete 2>/dev/null || true
echo " Removed system files"
echo ""
echo "capa-server cleaned "
# Clean badsign if it exists
if [ -d "../badsign" ]; then
echo ""
echo "==================================="
echo "badsign Repository Cleanup"
echo "==================================="
echo ""
cd ../badsign
echo "Cleaning Python cache..."
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete 2>/dev/null || true
find . -type f -name "*.pyo" -delete 2>/dev/null || true
echo " Removed Python cache"
echo "Cleaning build artifacts..."
rm -rf .pytest_cache/ 2>/dev/null || true
rm -rf badsign.egg-info/ 2>/dev/null || true
rm -rf data/ 2>/dev/null || true
rm -rf dist/ build/ 2>/dev/null || true
echo " Removed build artifacts"
# Clean system files
find . -name ".DS_Store" -delete 2>/dev/null || true
echo " Removed system files"
echo ""
echo "badsign cleaned "
fi
echo ""
echo "==================================="
echo "Cleanup Complete!"
echo "==================================="
echo ""
echo "Removed:"
echo " • Development test scripts"
echo " • Python cache (__pycache__, *.pyc)"
echo " • Build artifacts (.egg-info, .pytest_cache)"
echo " • System files (.DS_Store)"
echo ""
echo "Preserved:"
echo " • All documentation (*.md)"
echo " • Source code"
echo " • Configuration files"
echo " • Runtime data (data/)"
echo ""