UPdate script
[stands-website.git] / scripts / update.sh
index c2e1aa2241e31a9167e06ea617e49f2b680c1b55..726160f78b299686b360b55b6cceab7ed6a44178 100755 (executable)
@@ -1,13 +1,31 @@
 #!/bin/bash
 
-cd /var/opt/app/fosdem_submission/html/stands-website
+parent="/var/opt/app/fosdem_submission/html/stands-website"
+
+cd "$parent"
 
 git pull origin master
 
-git submodule init
-git submodule update
+#git submodule init
+#git submodule update
+
+#git pull --recurse-submodules
+
+
+for d in $(find content/stands -maxdepth 1 -type d); do
+
+       basename=$(basename "$d")
+       if [ "$basename" != "stands" ]; then
+               cd "$d"
+               git branch > /dev/null
+               echo "$d"
+               if [ "$?" == "0" ]; then
+                       git pull origin $(git branch | tail -1 | sed 's/*//' | awk '{print $1}')
+               fi
+               cd "$parent"
+       fi
 
-git pull --recurse-submodules
+done
 
 hugo