X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=do_patch;h=e886e2a3e214f11ddc32f68bd99aa16dea84b301;hb=HEAD;hp=3fe1df8e0f425dfcf81dbb39c65d9a1f6663b4fa;hpb=f5d75a951df06b206f4c1cfe72286806b6a3bb52;p=next-scripts diff --git a/do_patch b/do_patch index 3fe1df8..e886e2a 100755 --- a/do_patch +++ b/do_patch @@ -1,10 +1,5 @@ #!/bin/bash -LOG_FILE="../merge.log" -build_host="sprygo" -build_dir="/scratch/sfr/next" -build_cmd="bin/build_next" - no_build=false [ "$1" = "-n" ] && { shift @@ -14,7 +9,7 @@ no_build=false patch="$1" shift -[ -n "$1" ] && build_host="$1" +. "$(dirname $0)/common.sh" log() { @@ -32,11 +27,11 @@ GIT_EDITOR=: execute git am -3 "$patch" || exit 1 $no_build && exit 0 -rsync -avH --exclude .git --delete . "$build_host":"$build_dir"/. || { - echo Rsync failed 1>&2 +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 }