3892d31a404d37e58caad967792854c554adcd53
commit 3892d31a404d37e58caad967792854c554adcd53
Author: spesk1 <spesk@pm.me>
Date: Wed Jun 12 16:48:52 2019 -0400

initial commit

diff --git a/findGitlab.pl b/findGitlab.pl
new file mode 100755
index 0000000..560450a
--- /dev/null
+++ b/findGitlab.pl
@@ -0,0 +1,33 @@
+#!/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);
+}