simplified syncgit now that Gollum runs off main instead of master branch

This commit is contained in:
Axel Uhl
2024-08-15 15:18:00 +02:00
parent 58bba06894
commit a4cacd8848
@@ -9,27 +9,15 @@ else
GIT_PATH="$1"
fi
cd "$GIT_PATH"
git fetch github main:main >/tmp/wiki-git.out 2>/tmp/wiki-git.err
if [ "$?" != "0" ]; then
cat /tmp/wiki-git.out /tmp/wiki-git.err | mail -s "Wiki git problem: could not fetch github/main into local main" $ADMIN_EMAIL
fi
git push origin main:main >/tmp/wiki-git.out 2>/tmp/wiki-git.err
if [ "$?" != "0" ]; then
cat /tmp/wiki-git.out /tmp/wiki-git.err | mail -s "Wiki git problem: could not push main into sapsailing/main" $ADMIN_EMAIL
fi
git pull github main >/tmp/wiki-git.out 2>/tmp/wiki-git.err
if [ "$?" != "0" ]; then
cat /tmp/wiki-git.out /tmp/wiki-git.err | mail -s "Wiki git problem: could not merge github/main into sapsailing/master" $ADMIN_EMAIL
cat /tmp/wiki-git.out /tmp/wiki-git.err | mail -s "Wiki git problem: could not merge github/main into local main" $ADMIN_EMAIL
fi
git pull >/tmp/wiki-git.out 2>/tmp/wiki-git.err
git pull origin main >/tmp/wiki-git.out 2>/tmp/wiki-git.err
if [ "$?" != "0" ]; then
cat /tmp/wiki-git.out /tmp/wiki-git.err | mail -s "Wiki git problem: could not pull origin/master" $ADMIN_EMAIL
fi
git push origin master:main >>/tmp/wiki-git.out 2>/tmp/wiki-git.err
if [ "$?" != "0" ]; then
cat /tmp/wiki-git.out /tmp/wiki-git.err | mail -s "Wiki git problem: could not push master to origin/main" $ADMIN_EMAIL
fi
git push >>/tmp/wiki-git.out 2>/tmp/wiki-git.err
if [ "$?" != "0" ]; then
cat /tmp/wiki-git.out /tmp/wiki-git.err | mail -s "Wiki git problem: could not push master to origin/master" $ADMIN_EMAIL
cat /tmp/wiki-git.out /tmp/wiki-git.err | mail -s "Wiki git problem: could not pull origin/main" $ADMIN_EMAIL
fi