Update sub projects and add update.sh

This commit is contained in:
2019-03-29 17:43:08 +01:00
parent b6356f2fff
commit 3e18ac1049
7 changed files with 25 additions and 6 deletions
+1 -1
Submodule Builds updated: 1185c2bfe7...7c04d391e6
+1 -1
Submodule Lora updated: d1aa806c37...827d369ca6
+1 -1
Submodule Utils updated: f100cf0965...3e791e2543
+19
View File
@@ -0,0 +1,19 @@
function look_for_update() {
if [[ $1 == ./.* ]] || [[ $1 == "." ]]; then
return
fi
printf -v quotedFile '%q' "$1"
if [[ -f $quotedFile/update.sh ]]; then
echo "Switch to subdir $1 and run update.sh"
cd "$1"
bash -c ./update.sh
else
echo "Pull $quotedFile"
cd "$1"
git pull
fi
}
export -f look_for_update
find . -maxdepth 1 -type d -exec bash -c 'look_for_update "$0"' {} \;
read -p "Press return"