#!/bin/bash # Don't do releases in the wee hours :-) h=$(date '+%H') (( "$h" < 10 && "$h" > 4 )) && { echo "Go back to bed" 1>&2 exit 1 } mkdir Next echo 'Trees included into this release: Name Type URL ---- ---- ---' > Next/Trees IFS=' ' while read email type name url ref; do [[ "$email" =~ '^#.*$' ]] && continue tab="\t" [ $(echo "$name" | wc -c) -le 8 ] && tab="\t\t" [ "$type" = "git" ] && url="$url#$ref" printf "%s$tab%s\t%s\n" $name $type $url done <../real_control >>Next/Trees cp ../quilt-import.log ../merge.log Next/. # This means I get the right tag if I finish after midnight d=$(date --date "5 hours ago" '+%Y%m%d') printf "%s-next-%s\n" "" $d >localversion-next git add Next localversion-next git commit -s -v -a -m "Add linux-next specific files for $d" git tag "next-$d" git update-ref refs/heads/stable refs/remotes/origin/master # Stitch the new tree into the history branch new_ref=$(echo "next-$d" | git commit-tree 'HEAD^{tree}' -p history -p HEAD) git update-ref -m "next-$d" refs/heads/history $new_ref # Create a patch to remove the localversion-next file cat >../nolocalversion-$d.patch <