Last change
on this file since 1843 was 5, checked in by Bruno Cornec, 18 years ago |
Lots of modifs to find the right way. Probably still not good
|
-
Property svn:executable
set to
*
|
File size:
900 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{'PBTMP'}/out.spec") || die "Unable to create $ENV{'MONDOTMP'}/out.spec";
|
---|
11 | open(CMT, "> $ENV{'PBTMP'}/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{'PBTMP'}/out.spec", $ARGV[0]);
|
---|
32 | exit(0);
|
---|
33 | }
|
---|
34 | }
|
---|
35 | }
|
---|
36 |
|
---|
37 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.