Add submodule updating to git-sync-all wrapper script

This commit is contained in:
Evie Litherland-Smith 2024-05-21 07:06:17 +01:00
parent 8e7bc3aeaf
commit a15a58450d

View file

@ -18,7 +18,10 @@ for i in "${!SYNC_DIRS[@]}"; do
( (
cd "$DIRECTORY" || exit cd "$DIRECTORY" || exit
git remote set-url origin "$URL" git remote set-url origin "$URL"
git pull --ff --ff-only
git submodule update --remote --recursive
git-sync -ns git-sync -ns
git status --porcelain
) )
done done
@ -44,7 +47,7 @@ for i in "${!PULL_DIRS[@]}"; do
cd "$DIRECTORY" || exit cd "$DIRECTORY" || exit
if [ "$(git branch --show-current)" = "main" ]; then if [ "$(git branch --show-current)" = "main" ]; then
git remote set-url origin "$URL" git remote set-url origin "$URL"
git pull --ff-only git pull --ff --ff-only
git push git push
else else
echo "Not syncing repo $DIRECTORY on branch $(git branch --show-current)" echo "Not syncing repo $DIRECTORY on branch $(git branch --show-current)"