diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-09-12 15:20:14 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-09-12 15:20:14 -0300 |
commit | 501a54f0edea703168f8fb7d5e27e915087906e6 (patch) | |
tree | bbbe1072fcfd0aaa02d66c9b91a0cab076a37b69 /v4l/scripts/hghead.pl | |
parent | 995f38acadb5dae1fb1b2769714d5e45aeb9db5c (diff) | |
parent | d97a5c24bb8f480281d7bedce89525dab393b142 (diff) | |
download | mediapointer-dvb-s2-501a54f0edea703168f8fb7d5e27e915087906e6.tar.gz mediapointer-dvb-s2-501a54f0edea703168f8fb7d5e27e915087906e6.tar.bz2 |
merge: http://linuxtv.org/hg/~mcisely/pvrusb2
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l/scripts/hghead.pl')
-rwxr-xr-x | v4l/scripts/hghead.pl | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/v4l/scripts/hghead.pl b/v4l/scripts/hghead.pl index dd4cedee6..7b3f3106d 100755 --- a/v4l/scripts/hghead.pl +++ b/v4l/scripts/hghead.pl @@ -47,15 +47,22 @@ while ($line = <IN>) { if ($line =~ m/^Date:\s*(.*)/) { my $time = str2time($1); -# my $timestr = gmtime($time); if ($time) { - print "# Date: $time\n"; + print "#Date: $1\n"; } next; } - if ($line =~ m/^From:/) { - if ($line =~ m/^From:[\s\"]*([^\"]*)[\s\"]*<(.*)>/) { + + my $tag=$line; + my $arg=$line; + $tag =~ s/\s*([^\s]+:)(.*)\n/\1/; + $arg =~ s/\s*([^\s]+:)(.*)\n/\2/; + + $tag =~ tr/A-Z/a-z/; + + if ($tag =~ m/^from:/) { + if ($arg =~ m/^[\s\"]*([^\"]*)[\s\"]*<(.*)>/) { if ($1 eq "") { next; } @@ -75,8 +82,8 @@ while ($line = <IN>) { die; } - if ($line =~ m/^Subject:\s*(.*\n)/) { - $subject=$1; + if ($tag =~ m/^subject:/) { + $subject="$arg\n"; next; } @@ -87,7 +94,7 @@ while ($line = <IN>) { next; } - if ($line =~ m/^Signed-off-by:.*/) { + if ($tag =~ m/^signed-off-by:.*/) { $noblank=1; if ($line =~ m/$maintainer_name/) { $maint_ok=1; @@ -110,8 +117,7 @@ while ($line = <IN>) { next; } - - if ($line =~ m/^(Acked-by|Acked-By|acked-by|Thanks-to|cc|CC|Cc):.*/) { + if ($tag =~ m/^(acked-by|thanks-to|reviewed-by|cc):/) { $signed="$signed$line"; next; } @@ -120,7 +126,7 @@ while ($line = <IN>) { if ($line =~ m/Changeset:\s*(.*)\n/) { $num=$1; } -# print "# $line"; + print "# $line"; next; } |