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 291876b commit d8d0cc0Copy full SHA for d8d0cc0
get_packages.sh
@@ -0,0 +1,23 @@
1
+#!/bin/bash
2
+# Written by Nishant Srivastava
3
+
4
+# Call as
5
+# ./get_packages.sh
6
7
+echo "# Updating to packages..."
8
9
+# Iterate over each sub-directory inside the current directory
10
+for DIR in ./*;
11
+do
12
+ # Check if pubspec.yaml file exists inside the $DIR directory
13
+ # If it does then it is a Flutter project
14
+ if [ -f "$DIR/pubspec.yaml" ]; then
15
+ # Update the packages in the project
16
+ echo ""
17
+ echo ">>>> Get packages for " "$DIR"
18
+ # Run `flutter packages get` command inside the sub-directory i.e Flutter project
19
+ (cd "$DIR" && flutter packages get);
20
21
+ echo ">>>> Done."
22
+ fi
23
+done
0 commit comments