source: draft-ietf-httpbis/diffs/dodiff

Last change on this file was 1929, checked in by julian.reschke@…, 7 years ago

prepare release of -21 drafts on Oct 4

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