Browse Source

Small script to migrate from old git setup

Simon Watson 2 years ago
parent
commit
674075e777
1 changed files with 19 additions and 0 deletions
  1. 19 0
      migrate_to_gogs.pl

+ 19 - 0
migrate_to_gogs.pl

@@ -0,0 +1,19 @@
+#!/usr/bin/perl 
+
+use strict;
+use warnings;
+
+my $top_level = "/Users/swatson/Repos/git_migration/";
+my @dirs = split("\n", `ls -d */`);
+
+foreach my $dir (@dirs) {
+	#print("$dir\n");
+	$dir =~ s/\/$//g;
+	my $output = `git -C $dir remote set-url origin ssh://git\@git.spwbk.site:2222/swatson/$dir.git`;
+	print "$output\n";
+	$output = `git -C $dir remote -v`;
+	print $output;
+
+}
+
+