3 LOG_FILE="../merge.log"
5 build_dir="/scratch/sfr/next"
6 build_cmd="bin/build_next"
13 [ -n "$1" ] && build_host="$1"
15 cp /dev/null $LOG_FILE
19 echo "$@" | tee -a $LOG_FILE
25 $@ 2>&1 | tee -a $LOG_FILE
26 return ${PIPESTATUS[0]}
29 execute git checkout master
30 execute git reset --hard stable
32 heads=$(grep -v '^#' ../real_control | awk -F ' ' '$2=="quilt" { printf("quilt/%s ", $3); } $2=="git" { printf("%s/%s ", $3, $5); }')
36 old_head=$(git rev-parse HEAD)
37 execute git merge $h || {
38 echo Merge failed 1>&2
40 GIT_EDITOR=: execute git commit -v -a
41 execute git diff -M --stat --summary 'HEAD^..'
43 new_head=$(git rev-parse HEAD)
44 [ "$old_head" = "$new_head" ] && continue
46 rsync -avH --exclude .git --delete . "$build_host":"$build_dir"/. || {
47 echo Rsync failed 1>&2
50 ssh "$build_host" "$build_cmd" || {
51 echo Build failed 1>&2