]> git.ozlabs.org Git - next-scripts/blobdiff - merge_fix
do_build: Make the parallel logic work, drop set -e
[next-scripts] / merge_fix
index 9cf57c03322d14060611d7eb065a445295e1077c..7e6ff2b366efd5b640ef1251e88d88b0af65f387 100755 (executable)
--- 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()
 {
@@ -56,7 +45,7 @@ GIT_EDITOR=: execute git reset 'HEAD^' || {
        echo "git reset failed" 1>&2
        bash -i || exit
 }
-execute git add . || {
+execute git add -A . || {
        echo "git add failed" 1>&2
        bash -i || exit
 }
@@ -72,8 +61,7 @@ git push -f "$build_host":"$build_dir" master:refs/heads/next || {
        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
 }