summaryrefslogblamecommitdiffstats
path: root/changes2changelog
blob: 395860f8f337e408698a43da5bbff998cd86afa0 (plain) (tree)
1
2
3
4

                

                     


















                                                                           
#! /usr/bin/perl

$ENV{"LC_ALL"} = "C";

while (<>) {
	if (/^(|-+)$/) {
		next;
	} elsif (/^(\S.*) - (.*@.*)$/) {
		# print "[" . $1 . "]\n";
		open FH, 'date -u +"* %a %b %d %Y" -d "' . $1 . '" |';
		while (<FH>) {
			chomp;
			print $_ . " - " . $2 . "\n";
		}
		close FH;
		next;
	} elsif (/(- |  +)(?!\s)/) {
		print;
	} else {
		print STDERR "Syntax error in line $. of changelog:\n$_\n";
		exit 1;
	}
}