summaryrefslogtreecommitdiff
path: root/scripts/cvslastchange
Unidiff
Diffstat (limited to 'scripts/cvslastchange') (more/less context) (ignore whitespace changes)
-rw-r--r--scripts/cvslastchange25
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/cvslastchange b/scripts/cvslastchange
new file mode 100644
index 0000000..ca77297
--- a/dev/null
+++ b/scripts/cvslastchange
@@ -0,0 +1,25 @@
1#!/usr/bin/perl
2
3use File::Basename;
4
5die "need a filename!" if (!length($ARGV[0]));
6
7$cvsversion= dirname($0) . "/cvsversion";
8$version=`$cvsversion $ARGV[0]`;
9
10chop $version;
11my $vold = $version;
12my $vnew = $version;
13
14if ($version=~/^(.*)\.1$/) {
15 $vold = $1 if ($version=~/^([^.]\.[^.])\.[^.]\.[^.]$/);
16}
17else {
18 if ($version=~/^(.*)\.([^.]*)$/) { $v1 = $1; $v2 = $2 }
19 $v2old = ${v2}-1;
20 $vold = $v1 . '.' . $v2old;
21}
22print "cvs -f log -N -r$vnew $ARGV[0]\n";
23system("cvs -f log -N -r$vnew $ARGV[0]");
24print "cvs -f diff -bp -u -r$vold -r$vnew $ARGV[0]\n";
25system("cvs -f diff -bp -u -r$vold -r$vnew $ARGV[0]");