1
0
mirror of https://github.com/nisrulz/flutter-examples.git synced 2025-11-08 12:39:17 +00:00

🚧 updated delete build directory script

This commit is contained in:
Nishant Srivastava
2019-06-20 07:51:13 +02:00
parent b21f842b9c
commit a9d2759b6e

View File

@@ -7,13 +7,20 @@
# Install trash cli
# brew install trash
# Iterate over each child directory inside the current directory
echo ""
for dir in ./*;
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
trash $dir/build/
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