1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- #!/bin/sh
-
- set -eu
-
- main_repo=$(pwd)
-
- git_save() {
- status=$(git status -s)
-
- if [ "$status" ]; then
- git stash push --include-untracked
- return 0
- else
- set +e
- return 1
- fi
- }
-
- git_restore() {
- if [ $1 -eq 0 ]; then
- git stash pop
- fi
- }
-
-
- git pull
-
-
- echo "*** Updating Battle Engine repository ***"
- cd $main_repo/battle_engine
- git_save
- result=$?
- set -e
- git checkout master
- git pull
- git_restore $result
-
-
- echo "*** Updating g3headers repository ***"
- cd $main_repo/g3headers
- git_save
- result=$?
- set -e
- git checkout master
- git pull
- git_restore $result
-
-
- echo "*** Updating private repository ***"
- cd $main_repo/sots-private
- git_save
- result=$?
- set -e
- git checkout master
- git pull
- git_restore $result
|