source: draft-ietf-httpbis/diffs/dodiff @ 980

Last change on this file since 980 was 974, checked in by julian.reschke@…, 10 years ago

fix dodiff so it generates proper filesnames (not using the rfcdiff default anymore)

  • Property svn:eol-style set to native
File size: 1.5 KB
RevLine 
[557]1#!/usr/bin/perl
[167]2#
[557]3# usage: dodiff old new
4#  where old and new are directory siblings of this directory
5#  and contain different versions of the same files
[64]6
[557]7$rfcdiff = $ENV{'RFCDIFF'} || 'rfcdiff';
8@drafts = ( 'p1-messaging',
9            'p2-semantics',
10            'p3-payload',
11            'p4-conditional',
12            'p5-range',
13            'p6-cache',
14            'p7-auth' );
[264]15
[557]16$oldv = shift;
17$newv = shift;
[316]18
[557]19if (!(defined($oldv) && -d "../$oldv")) {
20    die "first argument must be the name of the old directory\n";
21}
22if (!(defined($newv) && -d "../$newv")) {
23    die "second argument must be the name of the new directory\n";
24}
25if ($oldv eq $newv) {
26    die "no differences: both arguments are the same directory\n";
27}
[381]28
[557]29if ($newv =~ /^\d\d$/) {  # second argument is a two-digit draft version
30    $newf = "../$newv/draft-ietf-httpbis-";
31    $newb = "-$newv\.txt";
32}
33else {
34    $newf = "../$newv/";
35    $newb = ".txt";
36}
[547]37
[557]38if ($oldv eq 'orig') {
39    foreach $draft (@drafts) {
40        system $rfcdiff, "../orig/rfc2616-symrefs.txt", "$newf$draft$newb";
41    }
42}
43elsif ($oldv =~ /^\d\d$/) {
44    $oldf = "../$oldv/draft-ietf-httpbis-";
45    $oldb = "-$oldv\.txt";
[556]46
[557]47    foreach $draft (@drafts) {
[974]48        system("$rfcdiff --stdout $oldf$draft$oldb $newf$draft$newb > draft-ietf-httpbis-$draft-$newv-from-$oldv.diff.html");
[557]49    }
50}
51else {
52    $oldf = "../$oldv/";
53    $oldb = '.txt';
54
55    foreach $draft (@drafts) {
[974]56        system("$rfcdiff --stdout $oldf$draft$oldb $newf$draft$newb > $draft-$newv-from-$oldv.diff.html");
[557]57    }
58}
59
60exit 0;
Note: See TracBrowser for help on using the repository browser.