123456789101112131415161718192021222324252627282930313233 |
- #!/usr/bin/perl
- use strict;
- use warnings;
- sub find_origin {
- my $path = shift;
- my $configFile = $path . "config";
- if ( -f $configFile ) {
- my $origin = `cat $configFile | grep url | awk {'print \$3}'`;
- chomp $origin;
- if ( $origin =~ m/@(.*)\:/ ) {
- if ( $1 ne "spwbk.site" ) {
- print "$path has origin: $origin that does not match spwbk.site\n";
- }
- }
- }
- }
- sub find_git {
- my $path = shift;
- my $gitDirPath = $path . ".git/";
- if ( -d $gitDirPath ) {
- find_origin($gitDirPath);
- }
- }
- foreach my $dir ( split("\n",`ls -d */`) ) {
- chomp $dir;
- find_git($dir);
- }
|