]> git.ozlabs.org Git - next-scripts/blobdiff - merge_fix
update to_build_host a bit
[next-scripts] / merge_fix
index 0bb4ed3939090173e9f67b767670d5e740d11c26..9048251a23ab422c5be3df87d12c2a6ce82c36c5 100755 (executable)
--- a/merge_fix
+++ b/merge_fix
@@ -1,12 +1,5 @@
 #!/bin/bash
 
-LOG_FILE="../merge.log"
-build_host="ka2"
-build_dir="/scratch/sfr/next"
-build_cmd="bin/build_next"
-[ "$NEXT_BUILD_HOST" ] && build_host="$NEXT_BUILD_HOST"
-[ "$NEXT_BUILD_DIR" ] && build_dir="$NEXT_BUILD_DIR"
-
 no_build=false
 [ "$1" = "-n" ] && {
        shift
@@ -18,17 +11,8 @@ shift
        echo "patch does not exist" 1>&2
        exit 1
 }
-[ -n "$1" ] && {
-       build_host="$1"
-       shift
-}
-[ -n "$1" ] && {
-       build_dir="$1"
-       shift
-}
 
-export NEXT_BUILD_HOST="$build_host"
-export NEXT_BUILD_DIR="$build_dir"
+. "$(dirname $0)/common.sh"
 
 log()
 {
@@ -72,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
 }