|
Last change
on this file since 3847 was 922, checked in by Bruno Cornec, 19 years ago |
|
Delivery to MDV is now OK
|
-
Property svn:executable
set to
*
|
|
File size:
909 bytes
|
| Line | |
|---|
| 1 | #!/usr/bin/perl -w
|
|---|
| 2 | #
|
|---|
| 3 | # Remove changelog from official mdv package and
|
|---|
| 4 | # prepare the comment for the commit
|
|---|
| 5 |
|
|---|
| 6 | use strict;
|
|---|
| 7 | use File::Copy;
|
|---|
| 8 |
|
|---|
| 9 | open(FILE, $ARGV[0]) || die "Unable to open $ARGV[0]";
|
|---|
| 10 | open(OUT, "> $ENV{'MONDOTMP'}/out.spec") || die "Unable to create $ENV{'MONDOTMP'}/out.spec";
|
|---|
| 11 | open(CMT, "> $ENV{'MONDOTMP'}/cmt.spec") || die "Unable to create $ENV{'MONDOTMP'}/out.spec";
|
|---|
| 12 | while (<FILE>) {
|
|---|
| 13 | if ($_ !~ /^\%changelog/) {
|
|---|
| 14 | print OUT "$_";
|
|---|
| 15 | } else {
|
|---|
| 16 | # We found %changelog, that's the end for the spec
|
|---|
| 17 | print OUT "$_";
|
|---|
| 18 | close(OUT);
|
|---|
| 19 | # Next line is the date + ver => unneeded
|
|---|
| 20 | my $tmp = <FILE>;
|
|---|
| 21 |
|
|---|
| 22 | # Get the first changelog set into the comment for SVN
|
|---|
| 23 | while (<FILE>) {
|
|---|
| 24 | if ($_ !~ /^[ ]*$/) {
|
|---|
| 25 | print CMT "$_";
|
|---|
| 26 | } else {
|
|---|
| 27 | # We found an empty line, that's the end for the cmt
|
|---|
| 28 | close (CMT);
|
|---|
| 29 | close (FILE);
|
|---|
| 30 |
|
|---|
| 31 | move("$ENV{'MONDOTMP'}/out.spec", $ARGV[0]);
|
|---|
| 32 | exit(0);
|
|---|
| 33 | }
|
|---|
| 34 | }
|
|---|
| 35 | }
|
|---|
| 36 |
|
|---|
| 37 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.