]> git.ozlabs.org Git - next-scripts/blobdiff - do_patch
update to_build_host a bit
[next-scripts] / do_patch
index e17c79c23c2b9e1d2ed377baa7054a2744408857..e886e2a3e214f11ddc32f68bd99aa16dea84b301 100755 (executable)
--- a/do_patch
+++ b/do_patch
@@ -1,13 +1,5 @@
 #!/bin/bash
 
-bin_dir="$(dirname $0)"
-
-LOG_FILE="../merge.log"
-build_host="ka2"
-build_dir="/scratch/sfr/next"
-[ "$NEXT_BUILD_HOST" ] && build_host="$NEXT_BUILD_HOST"
-[ "$NEXT_BUILD_DIR" ] && build_dir="$NEXT_BUILD_DIR"
-
 no_build=false
 [ "$1" = "-n" ] && {
        shift
@@ -17,17 +9,7 @@ no_build=false
 patch="$1"
 shift
 
-[ -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()
 {
@@ -45,7 +27,7 @@ GIT_EDITOR=: execute git am -3 "$patch" || exit 1
 
 $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
 }