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:
@@ -7,13 +7,20 @@
|
|||||||
# Install trash cli
|
# Install trash cli
|
||||||
# brew install trash
|
# brew install trash
|
||||||
|
|
||||||
# Iterate over each child directory inside the current directory
|
echo "# Deleting build directories..."
|
||||||
echo ""
|
|
||||||
for dir in ./*;
|
# Iterate over each sub-directory inside the current directory
|
||||||
|
for DIR in ./*;
|
||||||
do
|
do
|
||||||
echo ""
|
# Check if build directory exists inside the $DIR directory
|
||||||
echo ">>>> Deleting build directory inside " $dir
|
# If it does then it is a Flutter project
|
||||||
trash $dir/build/
|
if [ -d "$DIR/build/" ]; then
|
||||||
echo ""
|
# Update the packages in the project
|
||||||
echo ">>>> Done."
|
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
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user