> > +die "Usage $0 [-n] <Changelog file>\nThis Perl script is meant to simplify/beautify BK ChangeLogs\nfor the linux kernel\n\nn\tFormat for the output\n\t0 - Short mode (one changelog == one line)\n\t1 - Full mode (changelogs separated by dashed line)\n\t2 - Original mode (one line consisting of changelog and author)[DEFAULT]\n" unless defined $ARGV[0];
> Why forbid filtering?
Jup, please keep that.
> > +my $fd = $ARGV[0];
> > +
> > +if (grep(/^-/,$ARGV[0])) {
> > + $mode = $ARGV[0];
> > + $mode =~ s/-//;
> > + $mode = 2 if ($mode > 2);
> > + $fd = $ARGV[1];
> It's time for some Getopt::. I'll merge the interesting parts of 0.92
> as posted by Tomas, my plan is: use the LINUX_BK2CHANGELOG variable for
> defaults, but allow to override them with command line arguments.
That's great as long as we're able to use the script both as a filter
and as a file processor (allowing multiple filenames given on cmdline).
> > # minimum space between entry and author for the original mode
> > @@ -160,7 +167,9 @@
> > }
> > }
> >
> > -while (<>)
> > +open FD,$fd;
> This gives room for nasty surprises, if $ARGV[whatever] starts with a
> ">" or "|". Easy to fix, but we can avoid this, because Perl already
> handles it for us. Check the docs on <> behaviour when extra command
> line arguments are left over.
Right.
T.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Tue May 14 2002 - 12:00:22 EST