3 LOG_FILE="../merge.log"
5 build_dir="/scratch/sfr/next"
6 build_cmd="bin/build_next"
13 [ -n "$1" ] && build_host="$1"
17 echo "$@" | tee -a $LOG_FILE
23 $@ 2>&1 | tee -a $LOG_FILE
24 return ${PIPESTATUS[0]}
27 heads=$(grep -v '^#' ../real_control | awk -F ' ' '$2=="quilt" { printf("quilt/%s ", $3); } $2=="git" { printf("%s/%s ", $3, $5); }')
31 old_head=$(git rev-parse HEAD)
32 execute git merge $h || {
33 echo Merge failed 1>&2
35 GIT_EDITOR=: execute git commit -v -a
36 execute git diff -M --stat --summary 'HEAD^..'
38 new_head=$(git rev-parse HEAD)
39 [ "$old_head" = "$new_head" ] && continue
41 rsync -avH --exclude .git --delete . "$build_host":"$build_dir"/. || {
42 echo Rsync failed 1>&2
45 ssh "$build_host" "$build_cmd" || {
46 echo Build failed 1>&2