sccscheck: more analysis of backup files
authorTony Finch <dot@dotat.at>
Tue, 28 Oct 2014 15:25:18 +0000 (15:25 +0000)
committerTony Finch <dot@dotat.at>
Tue, 28 Oct 2014 15:25:18 +0000 (15:25 +0000)
sccscheck

index d6b8499..966281b 100755 (executable)
--- a/sccscheck
+++ b/sccscheck
@@ -38,8 +38,18 @@ sub found {
                                print "SCCS UNGET $_\n";
                        }
                }
-               when (m{~$}) {
-                       print "BACK $_\n";
+               when (m{^(.*)(\.orig|~)$}s) {
+                       when (-f $1) {
+                               my $qback = quotemeta $_;
+                               my $qfile = quotemeta $1;
+                               system "diff -u $qback $qfile";
+                               if ($?) {
+                                       print "BACKDIFF $_\n"
+                               } else {
+                                       print "BACKSAME $_\n"
+                               }
+                       }
+                       print "BACKLESS $_\n";
                }
                when (m{\.gz$}) {
                        print "GZIP $_\n";