mirror of
https://github.com/nisrulz/flutter-examples.git
synced 2025-05-17 21:15:54 +08:00
27 lines
617 B
Bash
Executable File
27 lines
617 B
Bash
Executable File
#!/bin/bash
|
|
# Written by Nishant Srivastava
|
|
|
|
# Call as
|
|
# ./delete_build_folder.sh
|
|
|
|
# Install trash cli
|
|
# brew install trash
|
|
|
|
echo "# Deleting build directories..."
|
|
|
|
# Iterate over each sub-directory inside the current directory
|
|
for DIR in ./*;
|
|
do
|
|
# Check if build directory exists inside the $DIR directory
|
|
# If it does then it is a Flutter project
|
|
if [ -d "$DIR/build/" ]; then
|
|
# Update the packages in the project
|
|
echo ""
|
|
echo ">>>> Deleting build directory inside " "$DIR"
|
|
# Run command inside the sub-directory i.e Flutter project
|
|
(cd "$DIR" && trash build);
|
|
echo ""
|
|
echo ">>>> Done."
|
|
fi
|
|
done
|