]>
Commit | Line | Data |
---|---|---|
58fab02a JH |
1 | #!/bin/sh |
2 | # Prepare "What's cooking in git.git" | |
3 | ||
4 | master_at=$(git rev-parse --verify refs/heads/master) | |
5 | next_at=$(git rev-parse --verify refs/heads/next) | |
6 | ||
55dd4b0b | 7 | keep_master= |
67d7e9cf JH |
8 | case "$1" in |
9 | generate) | |
10 | echo Here are the topics that have been | |
11 | echo | |
12 | Meta/git-topic.perl --base=master | sed -e 's/^\*./\n*/' | |
13 | exit | |
14 | ;; | |
55dd4b0b JH |
15 | keep) |
16 | keep_master=--keep-master | |
17 | ;; | |
67d7e9cf JH |
18 | esac |
19 | ||
20 | eval $(LC_ALL=C date +"monthname=%b month=%m year=%Y date=%d dow=%a") | |
21 | ||
22 | lead="whats/cooking/$year/$month" | |
23 | issue=$( | |
24 | cd Meta && | |
25 | git ls-tree -r --name-only HEAD "$lead" | tail -n 1 | |
26 | ) | |
27 | if test -n "$issue" | |
28 | then | |
29 | issue=$( expr "$issue" : '.*/0*\([1-9][0-9]*\)\.txt$' ) | |
30 | issue=$(( $issue + 1 )) | |
31 | else | |
32 | issue=1 | |
33 | fi | |
34 | issue=$( printf "%02d" $issue ) | |
35 | mkdir -p "Meta/$lead" | |
36 | ||
37 | exec >"Meta/$lead/$issue.txt" | |
32e72b6e JH |
38 | |
39 | cat <<EOF | |
8b2fe5f4 | 40 | To: git@vger.kernel.org |
67d7e9cf | 41 | Subject: What's cooking in git.git ($monthname $year, #$issue; $dow, $date) |
32e72b6e JH |
42 | X-master-at: $master_at |
43 | X-next-at: $next_at | |
44 | ||
67d7e9cf JH |
45 | What's cooking in git.git ($monthname $year, #$issue; $dow, $date) |
46 | -------------------------------------------------- | |
32e72b6e JH |
47 | |
48 | EOF | |
58fab02a | 49 | |
67d7e9cf JH |
50 | last=$( |
51 | cd Meta && | |
52 | git ls-tree -r --name-only HEAD "whats/cooking" | tail -n 1 | |
53 | ) | |
f4d2f0c2 JH |
54 | |
55 | sed -e 's/^\[New Topics\]$/[Old New Topics]/' "Meta/$last" | | |
55dd4b0b | 56 | Meta/UWC $keep_master |