MaintNotes: Post 1.6.0 update
[git/spearce.git] / WC
blob3e60c3ad79f67699be8509960874eba890827c64
1 #!/bin/sh
2 # Prepare "What's cooking in git.git"
4 master_at=$(git rev-parse --verify refs/heads/master)
5 next_at=$(git rev-parse --verify refs/heads/next)
7 case "$1" in
8 generate)
9 echo Here are the topics that have been
10 echo
11 Meta/git-topic.perl --base=master | sed -e 's/^\*./\n*/'
12 exit
14 esac
16 eval $(LC_ALL=C date +"monthname=%b month=%m year=%Y date=%d dow=%a")
18 lead="whats/cooking/$year/$month"
19 issue=$(
20 cd Meta &&
21 git ls-tree -r --name-only HEAD "$lead" | tail -n 1
23 if test -n "$issue"
24 then
25 issue=$( expr "$issue" : '.*/0*\([1-9][0-9]*\)\.txt$' )
26 issue=$(( $issue + 1 ))
27 else
28 issue=1
30 issue=$( printf "%02d" $issue )
31 mkdir -p "Meta/$lead"
33 exec >"Meta/$lead/$issue.txt"
35 cat <<EOF
36 Subject: What's cooking in git.git ($monthname $year, #$issue; $dow, $date)
37 X-master-at: $master_at
38 X-next-at: $next_at
40 What's cooking in git.git ($monthname $year, #$issue; $dow, $date)
41 --------------------------------------------------
43 EOF
45 last=$(
46 cd Meta &&
47 git ls-tree -r --name-only HEAD "whats/cooking" | tail -n 1
50 sed -e 's/^\[New Topics\]$/[Old New Topics]/' "Meta/$last" |
51 Meta/UWC