transfered from codeberg
This commit is contained in:
29
clean
Executable file
29
clean
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Get the project root directory
|
||||
ROOT_DIR=$(cd "$(dirname "$0")" && pwd)
|
||||
BUILD_DIR="$ROOT_DIR/build"
|
||||
|
||||
echo "--- Cleaning Build Directories ---"
|
||||
|
||||
# List of directories to remove
|
||||
targets="debug release test"
|
||||
|
||||
for type in $targets; do
|
||||
target_path="$BUILD_DIR/$type"
|
||||
|
||||
if [ -d "$target_path" ]; then
|
||||
echo "Removing $target_path..."
|
||||
rm -rf "$target_path"
|
||||
else
|
||||
echo "Skipping $type (already clean)."
|
||||
fi
|
||||
done
|
||||
|
||||
# Optional: Clean up the copied compile_commands.json in root
|
||||
if [ -f "$ROOT_DIR/compile_commands.json" ]; then
|
||||
echo "Removing root compile_commands.json..."
|
||||
rm "$ROOT_DIR/compile_commands.json"
|
||||
fi
|
||||
|
||||
echo "Done."
|
||||
Reference in New Issue
Block a user