X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;ds=sidebyside;f=do_patch;h=e886e2a3e214f11ddc32f68bd99aa16dea84b301;hb=8d005867845651e014c233986a6ebe69d5e3744f;hp=f35dab640964aca2fc7759f76629b92d49d4e861;hpb=ba950ca97a30b852e16e72664f058dc13b338112;p=next-scripts diff --git a/do_patch b/do_patch index f35dab6..e886e2a 100755 --- a/do_patch +++ b/do_patch @@ -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 @@ -16,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() { @@ -44,11 +27,11 @@ 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 } -ssh "$build_host" "$build_cmd" || { +"$bin_dir/do_build" || { echo Build failed 1>&2 bash -i || exit }