2017-12-07 22:14:34 +01:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
|
|
|
if [ $# -lt 3 ]
|
|
|
|
then
|
|
|
|
echo "Usage: $0 GIT-USER GIT-BRANCH USER-MNT"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
clean_up() {
|
|
|
|
git merge --abort > /dev/null
|
|
|
|
}
|
|
|
|
|
|
|
|
(git merge HEAD || clean_up) > /dev/null
|
|
|
|
git pull --ff-only > /dev/null
|
2017-12-07 23:02:05 +01:00
|
|
|
if ! git config "remote.$1.url" > /dev/null; then
|
|
|
|
git remote add "$1" "git@git.dn42:$1/registry.git"
|
2017-12-07 22:14:34 +01:00
|
|
|
fi
|
2017-12-07 23:02:05 +01:00
|
|
|
git fetch "$1" 2> /dev/null
|
|
|
|
git merge --no-ff --no-commit "$1/$2" 2> /dev/null
|
2017-12-12 01:33:55 +01:00
|
|
|
./check-pol HEAD "$3" || (echo "Policy Check FAILED"; clean_up; exit 1)
|
|
|
|
./check-my-stuff "$3" || (echo "Schema Check FAILED"; clean_up; exit 1)
|
2017-12-07 22:14:34 +01:00
|
|
|
echo OK
|
|
|
|
clean_up
|