#!/usr/bin/perl -w use strict; use File::Basename; use File::Spec; -d '.git' or die "$0: Not a Git repository"; my $no_push = 0; $no_push = @ARGV && $ARGV[0] eq '-n'; my $root = dirname($0); my $application = "$root/application"; my $last = `(cd $root; git ls-files "whats" | tail -1)`; @ARGV = ("$root/$last"); my $output_file = "GH-PAGES/index.html"; open STDOUT, ">", $output_file or die "$0: Failed to open $output_file for writing: $!\n"; my %cooking; my $current; if (@ARGV) { while (<>) { next if /^-------/; next if m/^\[([^\]]*)\]/; if (/^[*] (\S+)/) { $current = $1; $cooking{$current} = ""; next; } next if /^ [+-]/; next unless $current; $cooking{$current} .= $_ unless /^\s*$/ && $cooking{$current} eq ''; } } my $title = "Currently in the 'pu' branch"; print <<"END";
The comment about each topic branch is taken from the latest What\'s cooking in erlang/otp email and may no longer apply if the topic branch has been updated.
\n"; print qq[This topic branch introduces ]; if ($n == 1) { print "1 line "; } else { print "$n lines "; } print "with whitespace errors.\n"; } my $text = $cooking{$topic}; unless (defined $text) { print "
New topic branch\n
\n"; } else { $text =~ s/\n\n/$&
/g; print "
$text\n" if $text ne ''; print "
" if $text eq ''; } print "