Mercurial > cgi-bin > hgwebdir.cgi > VMS > 2__runs_and_data
view scripts/remove_svn.pl @ 4:ef2b8d975a99
exec time vs task size data generation and calculation splited in two scripts
| author | Merten Sach <msach@mailbox.tu-berlin.de> |
|---|---|
| date | Mon, 12 Dec 2011 20:26:28 +0100 |
| parents | |
| children |
line source
1 #!/usr/bin/perl
3 # recursively goes through directory tree and removes the .svn
4 # dir in each, which removes the code from SVN control
6 $dirToSearch = `pwd`;
7 @foo = split("\n", $dirToSearch);
8 $dirToSearch = $foo[0];
9 doDir();
11 # SUBROUTINEs
12 #============================================================
14 sub doDir
15 { my @fileNames;
16 my $dirSearching = $dirToSearch;
17 print "doing dir: $dirSearching\n";
19 $dired = `ls -a $dirSearching`;
20 @fileNames = split("\n", $dired);
21 #print "filenames: ";
22 foreach $fileName (@fileNames)
23 { #print " $fileName ";
24 stat "$dirSearching/$fileName";
25 if( -d "$dirSearching/$fileName" )
26 { if( $fileName =~ /\.svn/ )
27 { print "found SVN: $fileName\n";
28 `rm -Rf $dirSearching/$fileName`;
29 }
30 elsif( !( $fileName =~ /\.|\.\./ ) )
31 { $dirToSearch = "$dirSearching/$fileName";
32 doDir();
33 }
34 }
35 }
36 }
