We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73a4a19 commit 9e742c5Copy full SHA for 9e742c5
delete_build_folder.sh
@@ -23,16 +23,11 @@
23
24
echo " 🗑 Deleting build directories..."
25
26
-# Iterate over each sub-directory inside the current directory
27
-for DIR in ./*;
+# Find all directories with name "build" inside the current directory, recursively
+for FOUND_BUILD_DIR in $(find . -type d -name "build");
28
do
29
- # Check if build directory exists inside the $DIR directory
30
- BUILD_DIR="$DIR/build/"
31
- if [ -d $BUILD_DIR ]; then
32
- echo " > Deleting build directory inside " "$DIR"
33
- # Run the trash command on build directory
34
- trash $BUILD_DIR
35
- fi
+ # Run the trash command on found build directory
+ trash $FOUND_BUILD_DIR
36
done
37
38
echo " ✔️ Done."
0 commit comments