3 bin_dir="$(dirname $0)"
5 LOG_FILE="../merge.log"
7 build_dir="/scratch/sfr/next"
8 [ "$NEXT_BUILD_HOST" ] && build_host="$NEXT_BUILD_HOST"
9 [ "$NEXT_BUILD_DIR" ] && build_dir="$NEXT_BUILD_DIR"
29 export NEXT_BUILD_HOST="$build_host"
30 export NEXT_BUILD_DIR="$build_dir"
34 echo "$@" | tee -a $LOG_FILE
40 $@ 2>&1 | tee -a $LOG_FILE
41 return ${PIPESTATUS[0]}
44 GIT_EDITOR=: execute git am -3 "$patch" || exit 1
48 git push -f "$build_host":"$build_dir" master:refs/heads/next || {
49 echo git push failed 1>&2
52 "$bin_dir/do_build" || {
53 echo Build failed 1>&2