+++ /dev/null
-#!/bin/bash
-
-today="$(date '+%Y%m%d')"
-
-no_build=false
-
-[ "$1" = "-n" ] && {
- shift
- no_build=true
-}
-
-. "$(dirname $0)/common.sh"
-
-log()
-{
- echo "$@" | tee -a $LOG_FILE
-}
-
-execute()
-{
- log "$" $@
- $@ 2>&1 | tee -a $LOG_FILE
- return ${PIPESTATUS[0]}
-}
-
-cpwd=../next
-
-git branch -f akpm-current/current akpm/current
-
-git branch -f akpm/base HEAD
-
-old_head=$(git rev-parse HEAD)
-hlog=$(git log -1 --oneline akpm-current/current) 2>/dev/null
-log Merging akpm-current/current "($hlog)"
-execute git merge akpm-current/current || {
- echo Merge failed 1>&2
- echo $h >>../merge.debug
- git diff >>../merge.debug 2>&1
- git diff 2>&1 | egrep -q '<<<<<|^\*' && {
- bash -i || exit
- }
- GIT_EDITOR=: execute git commit -v -a
- execute git diff -M --stat --summary 'HEAD^..'
-}
-printf "%s\t%s\n" akpm-current $(git show-ref --hash akpm-current/current) >> $SHA1_FILE
-
-[ -f "../merge-fixes/akpm-current" ] && {
- for p in $(cat "../merge-fixes/akpm-current"); do
- $(dirname $0)/merge_fix -n "$p" || {
- bash -i || exit
- }
- done
-}
-
-new_head=$(git rev-parse HEAD)
-
-$no_build ||
- [ "$old_head" = "$new_head" ] ||
- [ "$(git diff ${old_head}.. | wc -c)" -eq 0 ] || {
-
- git push -f "$build_host":"$build_dir" master:refs/heads/next || {
- echo git push failed 1>&2
- bash -i || exit
- }
- "$bin_dir/do_build" || {
- echo Build failed 1>&2
- bash -i || exit
- }
-}
-
-execute git clone -s -l -n -q . ../rebase-tmp || {
- echo Clone failed 1>&2
- bash -i || exit
-}
-log '$' cd ../rebase-tmp
-cd ../rebase-tmp
-execute git checkout -b akpm remotes/origin/akpm/master || {
- echo Checkout of remotes/origin/akpm/master failed 1>&2
- bash -i || exit
-}
-execute git rebase --onto master remotes/origin/akpm/master-base || {
- echo Rebase failed 1>&2
- bash -i || exit
-}
-echo "fix up?"
-bash -i
-log '$' cd $cpwd
-cd $cpwd
-execute git fetch -f ../rebase-tmp akpm:akpm/master || {
- echo Fetch of akpm/master failed 1>&2
- bash -i || exit
-}
-execute rm -rf ../rebase-tmp
-
-git branch -f akpm/master-base HEAD
-
-old_head=$(git rev-parse HEAD)
-log Merging akpm/master '('$(git log -1 --oneline akpm/master)')'
-execute git merge --no-ff akpm/master || {
- echo Merge failed 1>&2
- bash -i || exit
-}
-printf "%s\t\t%s\n" akpm $(git show-ref --hash akpm/master) >> $SHA1_FILE
-
-[ -f "../merge-fixes/akpm" ] && {
- for p in $(cat "../merge-fixes/akpm"); do
- $(dirname $0)/merge_fix -n "$p" || {
- bash -i || exit
- }
- done
-}
-
-new_head=$(git rev-parse HEAD)
-
-$no_build ||
- [ "$old_head" = "$new_head" ] ||
- [ "$(git diff ${old_head}.. | wc -c)" -eq 0 ] || {
-
- git push -f "$build_host":"$build_dir" master:refs/heads/next || {
- echo git push failed 1>&2
- bash -i || exit
- }
- "$bin_dir/do_build" || {
- echo Build failed 1>&2
- bash -i || exit
- }
-}
-
-exit 0