diff --git a/Builds b/Builds index fe53686..3765bd0 160000 --- a/Builds +++ b/Builds @@ -1 +1 @@ -Subproject commit fe53686fbe13a10fa3a0e67a788e07d45769dc7b +Subproject commit 3765bd0c6a4375a13ccff67bceae87790d48534c diff --git a/Librarys b/Librarys index edae417..c6d02a0 160000 --- a/Librarys +++ b/Librarys @@ -1 +1 @@ -Subproject commit edae4170e3558804cd5573f57182c88a4b7798ec +Subproject commit c6d02a0a71a60718a1086c2f6133cb74351004fc diff --git a/Lora b/Lora index 0a4f2b3..5d5d06b 160000 --- a/Lora +++ b/Lora @@ -1 +1 @@ -Subproject commit 0a4f2b3efb35b6fb53890b73186fbb0a8b384540 +Subproject commit 5d5d06b15a7c305ed5c301dc420ad9467e260b15 diff --git a/Lora-Bot b/Lora-Bot index 6b2df85..67b9729 160000 --- a/Lora-Bot +++ b/Lora-Bot @@ -1 +1 @@ -Subproject commit 6b2df85092d176147281d805395e47f50be91788 +Subproject commit 67b9729d04e43ebdc42e1b05ba621de42a74d9dd diff --git a/Lora-Map b/Lora-Map index f192cc7..7dc841f 160000 --- a/Lora-Map +++ b/Lora-Map @@ -1 +1 @@ -Subproject commit f192cc7b52150468606c5a5944ec0eb4b6da0fbd +Subproject commit 7dc841fe5cf291bc32020750f6161ef7ff852aee diff --git a/Lora-Scral b/Lora-Scral index e92178c..0ea8762 160000 --- a/Lora-Scral +++ b/Lora-Scral @@ -1 +1 @@ -Subproject commit e92178c17dd508d7b0f69df093ee05a818a94410 +Subproject commit 0ea8762cf27f575aed9ae57e3e820ad6e8398aea diff --git a/TTN-Bridge b/TTN-Bridge index e8c82f9..aa8d313 160000 --- a/TTN-Bridge +++ b/TTN-Bridge @@ -1 +1 @@ -Subproject commit e8c82f9355c9f27d485390e9f793fea999479f83 +Subproject commit aa8d313884f25b636006bd1cdcaffa99a796df5a diff --git a/Utils b/Utils index eea28bb..1219212 160000 --- a/Utils +++ b/Utils @@ -1 +1 @@ -Subproject commit eea28bb0fb727287b13d104a99b8d4446ede63a2 +Subproject commit 12192127269f1daf8f5a211373d7cbf284db88d4 diff --git a/update.sh b/update.sh index 69da820..79eb7d3 100644 --- a/update.sh +++ b/update.sh @@ -1,19 +1,38 @@ +#!/bin/bash + 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 + if [[ $1 == ./.git ]] || [[ $1 == "." ]]; then + echo "Ignore $1" + return + fi + WithoutPrefix=$(echo -n $1 | cut -c 2-) + if grep -qx "$WithoutPrefix" .gitignore; then + echo "Ignore $1, because it's in .gitignore" + return + fi + printf -v FolderNameEscaped '%q' "$1" + if [[ -f $1/update.sh ]]; then + echo "Switch to subdir $1 and run update.sh" + cd "$1" + bash -c "./update.sh nobreak" + else + if [[ -f $1/.git ]] + then + echo "Pull $1" + cd "$1" + git pull + else + echo "Checkout master for $1" + git submodule update --init -- "$1" + cd "$1" + git checkout master + fi fi } export -f look_for_update find . -maxdepth 1 -type d -exec bash -c 'look_for_update "$0"' {} \; -read -p "Press return" \ No newline at end of file + +if [ -z $1 ]; then + read -p "Press return" +fi \ No newline at end of file