From: Junio C Hamano Date: Thu, 7 Aug 2008 01:38:56 +0000 (-0700) Subject: WI/WC script pair updates X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67d7e9cfdf51eb914c86d82e9867693235724cf6;p=thirdparty%2Fgit.git WI/WC script pair updates --- diff --git a/UWC b/UWC index 868b41ba28..7391dedc9f 100755 --- a/UWC +++ b/UWC @@ -222,7 +222,7 @@ close FH; if (@ARGV > 1) { open FH, "$ARGV[1]"; } else { - open FH, "Meta/WC |"; + open FH, "Meta/WC generate |"; } $new_wc = parse_whats_cooking(\*FH); close FH; diff --git a/WC b/WC index cd2fc89be8..6a16784fe3 100755 --- a/WC +++ b/WC @@ -4,18 +4,46 @@ master_at=$(git rev-parse --verify refs/heads/master) next_at=$(git rev-parse --verify refs/heads/next) +case "$1" in +generate) + echo Here are the topics that have been + echo + Meta/git-topic.perl --base=master | sed -e 's/^\*./\n*/' + exit + ;; +esac + +eval $(LC_ALL=C date +"monthname=%b month=%m year=%Y date=%d dow=%a") + +lead="whats/cooking/$year/$month" +issue=$( + cd Meta && + git ls-tree -r --name-only HEAD "$lead" | tail -n 1 +) +if test -n "$issue" +then + issue=$( expr "$issue" : '.*/0*\([1-9][0-9]*\)\.txt$' ) + issue=$(( $issue + 1 )) +else + issue=1 +fi +issue=$( printf "%02d" $issue ) +mkdir -p "Meta/$lead" + +exec >"Meta/$lead/$issue.txt" cat <"Meta/$lead/$issue.txt" + +cat </dev/null`