X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=merge_fix;h=9048251a23ab422c5be3df87d12c2a6ce82c36c5;hb=HEAD;hp=e1d68e1d6eda0db00b14bd3c59c9cfbb257a11c0;hpb=60a1d068ee2fdefa6ccf36fad3d6c91fb9a1d242;p=next-scripts diff --git a/merge_fix b/merge_fix index e1d68e1..9048251 100755 --- a/merge_fix +++ b/merge_fix @@ -1,10 +1,5 @@ #!/bin/bash -LOG_FILE="../merge.log" -build_host="ka2" -build_dir="/scratch/sfr/next" -build_cmd="bin/build_next" - no_build=false [ "$1" = "-n" ] && { shift @@ -16,14 +11,8 @@ shift echo "patch does not exist" 1>&2 exit 1 } -[ -n "$1" ] && { - build_host="$1" - shift -} -[ -n "$1" ] && { - build_dir="$1" - shift -} + +. "$(dirname $0)/common.sh" log() { @@ -67,13 +56,12 @@ GIT_EDITOR=: execute git commit -v -a --amend || { $no_build && exit 0 -git push -f "$build_host":"$build_dir" master:refs/heads/next || { +git push -f "${build_host}${build_host:+:}${build_dir}" master:refs/heads/next || { echo git push failed 1>&2 bash -i || exit } -echo "Building using $build_cmd on $build_host" -ssh "$build_host" "$build_cmd" || { +"$bin_dir/do_build" || { echo Build failed 1>&2 bash -i || exit }