summaryrefslogtreecommitdiffstats
path: root/update_all_submodules
diff options
context:
space:
mode:
Diffstat (limited to 'update_all_submodules')
-rwxr-xr-xupdate_all_submodules7
1 files changed, 7 insertions, 0 deletions
diff --git a/update_all_submodules b/update_all_submodules
index 74cdfbd..5f21cfd 100755
--- a/update_all_submodules
+++ b/update_all_submodules
@@ -2,6 +2,13 @@
PARENTDIR=$PWD
echo "Working in $PARENTDIR"
+if [[ ! -d .git ]]; then
+ echo "Current directory does not contain a .git folder. Exiting..."
+ exit 1
+fi
+git pull
+git reset --hard HEAD
+git clean -d -x -f
exec 3< submodules
while read <&3