-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathcleanup.sh
More file actions
executable file
·42 lines (35 loc) · 1021 Bytes
/
cleanup.sh
File metadata and controls
executable file
·42 lines (35 loc) · 1021 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
#!/bin/bash
# Minimal cleanup script for CodeBadger
# Cleans codebases (except core) and CPGs
set -e
PLAYGROUND_PATH="./playground"
CODEBASES_PATH="$PLAYGROUND_PATH/codebases"
CPGS_PATH="$PLAYGROUND_PATH/cpgs"
echo "🧹 CodeBadger Cleanup"
echo "=============================="
# Clean codebases (except core)
if [ -d "$CODEBASES_PATH" ]; then
echo "Cleaning codebases (keeping core)..."
find "$CODEBASES_PATH" -maxdepth 1 -type d ! -name "core" ! -name "codebases" -exec rm -rf {} + 2>/dev/null || true
echo "✓ Codebases cleaned"
else
echo "⚠ Codebases directory not found"
fi
# Clean CPGs
if [ -d "$CPGS_PATH" ]; then
echo "Cleaning CPGs..."
rm -rf "$CPGS_PATH"/*
echo "✓ CPGs cleaned"
else
echo "⚠ CPGs directory not found"
fi
# Clean SQLite database
if [ -f "codebadger.db" ]; then
echo "Cleaning SQLite database..."
rm "codebadger.db"
echo "✓ SQLite database removed"
else
echo "⚠ SQLite database not found"
fi
echo ""
echo "✅ Cleanup complete!"