sccscheck: backup files with sccs histories?
authorTony Finch <dot@dotat.at>
Tue, 28 Oct 2014 15:50:37 +0000 (15:50 +0000)
committerTony Finch <dot@dotat.at>
Tue, 28 Oct 2014 15:50:37 +0000 (15:50 +0000)
sccscheck

index 966281b..fd5612c 100755 (executable)
--- a/sccscheck
+++ b/sccscheck
@@ -38,10 +38,13 @@ sub found {
                                print "SCCS UNGET $_\n";
                        }
                }
-               when (m{^(.*)(\.orig|~)$}s) {
-                       when (-f $1) {
+               when (m{^(.*)/([^/]+)(\.orig|~)$}s) {
+                       if (-f "$1/SCCS/s.$2") {
+                               print "BACKSCCS $_\n";
+                       }
+                       when (-f "$1/$2") {
                                my $qback = quotemeta $_;
-                               my $qfile = quotemeta $1;
+                               my $qfile = quotemeta "$1/$2";
                                system "diff -u $qback $qfile";
                                if ($?) {
                                        print "BACKDIFF $_\n"