ppcrcd/trunk/find_not_in_svn.pl

sparky cvs at pld-linux.org
Fri Mar 3 17:57:07 CET 2006


Author: sparky
Date: Fri Mar  3 17:57:04 2006
New Revision: 7082

Added:
   ppcrcd/trunk/find_not_in_svn.pl   (contents, props changed)
Log:
- simple script to checking for not added files


Added: ppcrcd/trunk/find_not_in_svn.pl
==============================================================================
--- (empty file)
+++ ppcrcd/trunk/find_not_in_svn.pl	Fri Mar  3 17:57:04 2006
@@ -0,0 +1,33 @@
+#!/usr/bin/perl
+#
+use strict;
+use warnings;
+
+sub subdir($);
+sub subdir($) {
+	my ($dir) = @_;
+	warn "Checking dir: $dir\n";
+	my @in_svn;
+	foreach ( `svn ls $dir` ) {
+		chomp;
+		s#/$##;
+		push @in_svn, $_;
+	}
+	my $d_in;
+	my @dirs_to_check;
+	opendir $d_in, "./".$dir;
+	while ( my $file = readdir $d_in ) {
+		grep { $_ eq $file } qw(. .. .svn) and next;
+		unless ( grep { $_ eq $file } @in_svn ) {
+			print $dir.$file."\n";
+		} else {
+			-d $dir.$file and push @dirs_to_check, $dir.$file."/";
+		}
+	}
+	closedir $d_in;
+	foreach my $dir ( @dirs_to_check ) {
+		subdir($dir);
+	}
+}
+
+subdir("");


More information about the pld-cvs-commit mailing list