Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Side by Side Diff: debian.chrome/scripts/misc/insert-ubuntu-changes

Issue 646032: Rename config to match naming convention. (Closed)
Patch Set: Send mail Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « debian.chrome/scripts/misc/insert-changes.pl ('k') | debian.chrome/scripts/misc/kernelconfig » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/perl
2
3 if ($#ARGV != 2) {
4 die "Usage: $0 <changelog> <stop at> <start at>\n";
5 }
6 my ($changelog, $end, $start) = @ARGV;
7
8 $end =~ s/.*\.//;
9 $start =~ s/.*\.//;
10
11 my @changes = ();
12 my $output = 0;
13 open(CHG, "<debian.chrome/changelog") ||
14 open(CHG, "<debian/changelog") ||
15 die "$0: debian/changelog: open failed - $!\n";
16 while (<CHG>) {
17 if (/^\S+\s+\((.*\.(\d+))\)/) {
18 if ($2 <= $end) {
19 last;
20 }
21 if ($2 == $start) {
22 $output = 1;
23 }
24 if ($output) {
25 push(@changes, "\n [ Ubuntu: $1 ]\n\n");
26 next;
27 }
28 }
29 next if ($output == 0);
30
31 next if (/^\s*$/);
32 next if (/^\s--/);
33 next if (/^\s\s[^\*\s]/);
34
35 push(@changes, $_);
36 }
37 close(CHG);
38
39 open(CHANGELOG, "< $changelog") or die "Cannot open changelog";
40 open(NEW, "> $changelog.new") or die "Cannot open new changelog";
41
42 $printed = 3;
43 while (<CHANGELOG>) {
44 if (/^ CHANGELOG: /) {
45 $printed--;
46 print NEW;
47 if ($printed == 0) {
48 print NEW @changes;
49 }
50 next;
51 }
52 print NEW;
53 }
54
55 close(NEW);
56 close(CHANGELOG);
57
58 rename("$changelog.new", "$changelog");
OLDNEW
« no previous file with comments | « debian.chrome/scripts/misc/insert-changes.pl ('k') | debian.chrome/scripts/misc/kernelconfig » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698