3 LOG_FILE="../merge.log"
5 build_dir="/scatch/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 log '$' git commit -v -a
42 execute git diff -M --stat --summary 'HEAD^..'
44 new_head=$(git rev-parse HEAD)
45 [ "$old_head" = "$new_head" ] && continue
47 rsync -avH --exclude .git --delete . "$build_host":"$build_dir"/. || {
48 echo Rsync failed 1>&2
51 ssh "$build_host" "$build_cmd" || {
52 echo Build failed 1>&2