File: changes2changelog

package info (click to toggle)
quilt 0.48-7
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,244 kB
  • ctags: 193
  • sloc: sh: 5,922; perl: 1,369; lisp: 430; makefile: 388
file content (23 lines) | stat: -rwxr-xr-x 409 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#! /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;
	}
}