-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathclean-all-examples.sh
More file actions
34 lines (30 loc) · 1.06 KB
/
clean-all-examples.sh
File metadata and controls
34 lines (30 loc) · 1.06 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
#!/bin/bash
# clean-all-examples.sh
# Remove all built example binaries and unit output
set -e
if [ -d "example-bin" ]; then
echo "🧹 Removing example-bin/ directory..."
rm -rf example-bin
echo "✅ example-bin/ cleaned."
else
echo "ℹ️ example-bin/ does not exist. Nothing to clean."
fi
for ex in ColorDemo ErrorHandlingDemo LongRunningOpDemo ProgressDemo SimpleDemo SubCommandDemo; do
if [ -d "examples/$ex/lib" ]; then
echo "🧹 Removing old lib/ from examples/$ex..."
rm -rf "examples/$ex/lib"
fi
if [ -d "examples/$ex/x86_64-win64" ]; then
echo "🧹 Removing old x86_64-win64/ from examples/$ex..."
rm -rf "examples/$ex/x86_64-win64"
fi
if [ -d "examples/$ex/x86_64-linux" ]; then
echo "🧹 Removing old x86_64-linux/ from examples/$ex..."
rm -rf "examples/$ex/x86_64-linux"
fi
if [ -d "examples/$ex/backup" ]; then
echo "🧹 Cleaning backup/ in examples/$ex..."
find "examples/$ex/backup" -type f \( -name '*.exe' -o -name '*.dbg' -o -name '*.o' -o -name '*.ppu' \) -delete
fi
done
echo "\n✅ Cleanup complete."