Browse files

Added a quick mirror-everything script

  • Loading branch information...
1 parent eba9831 commit 41e58d1d434dd2a6cd09638920cb0fa9ce335d1e @CloCkWeRX committed Mar 25, 2012
Showing with 19 additions and 0 deletions.
  1. +19 −0 admin-mirror-all.php
View
19 admin-mirror-all.php
@@ -0,0 +1,19 @@
+<?php
+$result = `svn list https://svn.php.net/repository/pear/packages`;
+$result = trim($result);
+$result = str_replace('/', '', $result);
+$packages = preg_split('/[\r\n]+/', $result);
+
+foreach ($packages as $package) {
+ $workbench = $package . "-workbench";
+ if (!file_exists($workbench)) {
+ print "mkdir ". $workbench . "\n";
+ print "cd " . $workbench . "\n";
+ print "git-svn-mirror init --authors=../authors.txt --from=http://svn.php.net/repository/pear/packages/" . $package . "/ --to=git@github.com:pear/" . $package . ".git\n";
+ print "cd ..\n";
+ } else {
+ print "cd " . $workbench . "\n";
+ print "git-svn-mirror update \n";
+ print "cd ..\n";
+ }
+}

0 comments on commit 41e58d1

Please sign in to comment.