aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2014-01-22 11:42:34 +0100
committerJustin Lecher <jlec@gentoo.org>2014-01-22 11:44:05 +0100
commit5444c1b59b5ffd2c2f783cb21eb3ba3ae86440b1 (patch)
treeb8089fa7ef7daba293dfb2bf48e9fa1b2c69d8bb /scripts
parentAdd Maintainer section (diff)
downloadsci-5444c1b59b5ffd2c2f783cb21eb3ba3ae86440b1.tar.gz
sci-5444c1b59b5ffd2c2f783cb21eb3ba3ae86440b1.tar.bz2
sci-5444c1b59b5ffd2c2f783cb21eb3ba3ae86440b1.zip
Import script, original idea by alexxy
Signed-off-by: Justin Lecher <jlec@gentoo.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/merge-dualHEAD63
1 files changed, 63 insertions, 0 deletions
diff --git a/scripts/merge-dualHEAD b/scripts/merge-dualHEAD
new file mode 100755
index 000000000..c926881d1
--- /dev/null
+++ b/scripts/merge-dualHEAD
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+if [[ -f /usr/lib64/portage/bin/isolated-functions.sh ]]; then
+ . /usr/lib64/portage/bin/isolated-functions.sh
+elif [[ -f /usr/lib/portage/bin/isolated-functions.sh ]]; then
+ . /usr/lib/portage/bin/isolated-functions.sh
+else
+ alias ebegin=echo
+ alias eend=true
+fi
+
+ebegin "Starting from master"
+ echo
+ git checkout master || exit; _ret=$?
+ echo
+eend ${_ret}
+
+ebegin "Fetching everything"
+ echo
+ git fetch --all -v || exit; _ret=$?
+ echo
+eend ${_ret}
+
+ebegin "Merging github"
+ echo
+ git merge -v github/master || exit; _ret=$?
+ echo
+eend ${_ret}
+
+ebegin "Pushing to g.o.g.o"
+ git push -v origin || exit; _ret=$?
+ echo
+eend ${_ret}
+
+ebegin "Branching out github"
+ echo
+ git checkout -b github-merging github/master || exit; _ret=$?
+ echo
+eend ${_ret}
+
+ebegin "Merging in g.o.g.o"
+ echo
+ git merge -v origin/master || exit; _ret=$?
+ echo
+eend ${_ret}
+
+ebegin "Pushing to github"
+ echo
+ git push -v github HEAD:master || exit; _ret=$?
+ echo
+eend ${_ret}
+
+ebegin "Going back to master"
+ echo
+ git checkout master || exit; _ret=$?
+ echo
+eend ${_ret}
+
+ebegin "Removing github branch"
+ echo
+ git branch -v -D github-merging || exit; _ret=$?
+ echo
+eend ${_ret}