File tree Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change 7
7
# Install trash cli
8
8
# brew install trash
9
9
10
- # Iterate over each child directory inside the current directory
11
- echo " "
12
- for dir in ./* ;
10
+ echo " # Deleting build directories..."
11
+
12
+ # Iterate over each sub-directory inside the current directory
13
+ for DIR in ./* ;
13
14
do
14
- echo " "
15
- echo " >>>> Deleting build directory inside " $dir
16
- trash $dir /build/
17
- echo " "
18
- echo " >>>> Done."
15
+ # Check if build directory exists inside the $DIR directory
16
+ # If it does then it is a Flutter project
17
+ if [ -d " $DIR /build/" ]; then
18
+ # Update the packages in the project
19
+ echo " "
20
+ echo " >>>> Deleting build directory inside " " $DIR "
21
+ # Run command inside the sub-directory i.e Flutter project
22
+ (cd " $DIR " && trash build);
23
+ echo " "
24
+ echo " >>>> Done."
25
+ fi
19
26
done
You can’t perform that action at this time.
0 commit comments