gwynne          Fri Nov  7 06:52:28 2008 UTC

  Modified files:              
    /SVNROOT    run-conversion.php 
  Log:
  add install phase for administrative files, embed is defunct
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.8&r2=1.9&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.8 SVNROOT/run-conversion.php:1.9
--- SVNROOT/run-conversion.php:1.8      Fri Nov  7 00:11:20 2008
+++ SVNROOT/run-conversion.php  Fri Nov  7 06:52:27 2008
@@ -2,13 +2,14 @@
 
 // 
-----------------------------------------------------------------------------------------------------------------------------
 // Constants
-$version = substr('$Revision: 1.8 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.9 $', strlen('$Revision: '), -2);
 
 $passes = array(
     'processcvs',       // Process CVS modules
     'svncreate',        // Create various SVN repositories
     'cvs2svn',          // Run conversion for each repository
     'cleanup',          // Preform renaming and removes for each repo
+    'install',          // Install hook scripts, authz databases, etc.
 );
 
 // 
-----------------------------------------------------------------------------------------------------------------------------
@@ -155,6 +156,9 @@
         if ($isMetaModule) {
             $modprefix = $moduleName . '/';
             foreach(scandir_no_meta($cvspath) as $module) {
+                if (count(scandir($cvspath . $module)) == 2) {
+                    continue; // empty dir
+                }
                 $this->optionsFileContents .= <<<EOEXTRA
 run_options.add_project(
     '{$cvspath}{$module}',
@@ -337,6 +341,12 @@
         }
         v(1, "Done fixing up.");
     }
+    
+    public function installAdminFiles()
+    {
+        v(1, "Installing administrative files for repository 
'{$this->repositoryName}'...\n");
+        v(1, "Done installing administrative files.\n")
+    }
 }
 
 // 
-----------------------------------------------------------------------------------------------------------------------------
@@ -387,7 +397,7 @@
             continue;
         }
         if (in_array($cvs_module, array('smarty', 'smarty-web', 'php4.fubar', 
'php4.unused', 'peardoc.backup', 'php3', 'phpfi', 'livedocs',
-                'Zend', 'functable', 'dialin', 'docstuff', 'jpgraph', 
'phpoc_de', 'phpdoc-fa_IR', 'lxr', 'portal', 'pres'))) {
+                'Zend', 'functable', 'dialin', 'docstuff', 'jpgraph', 
'phpoc_de', 'phpdoc-fa_IR', 'lxr', 'portal', 'pres', 'embed'))) {
             continue;
         } else if (in_array($cvs_module, array('php-gtk', 'php-gtk-doc', 
'old-php-gtk-modules'))) {
             $repoList['gtk']->addCVSModule($cvs_module);
@@ -483,6 +493,35 @@
 }
 
 // 
-----------------------------------------------------------------------------------------------------------------------------
+// install pass
+function pass_install()
+{
+    foreach ($GLOBALS['repoList'] as $repo) {
+        $repo->installAdminFiles();
+    }
+    if (!file_exists($GLOBALS['options']['svnroot'] . DIRECTORY_SEPARATOR . 
'svn.authz')) {
+        file_put_contents($GLOBALS['options']['svnroot'] . DIRECTORY_SEPARATOR 
. 'svn.authz', <<<EOAUTHZ
+[groups]
+
+[aliases]
+
+[/]
+svnread = r
+EOAUTHZ
+        );
+    }
+    if (!file_exists($GLOBALS['options']['svnroot'] . DIRECTORY_SEPARATOR . 
'svn.users')) {
+        $command = 'htpasswd -bcm ' . 
escapeshellarg($GLOBALS['options']['svnroot'] . DIRECTORY_SEPARATOR . 
'svn.users') . ' svnread svnread';
+        v(2, "Executing '{$command}'...");
+        exec($command, $output, $exitstatus);
+        if ($exitstatus != 0) {
+            error("\nAn error occurred. Exit status was {$exitstatus}. 
Output:\n" . implode("\n", $output) . "\n");
+        }
+        v(2, " done.\n");
+    }
+}
+
+// 
-----------------------------------------------------------------------------------------------------------------------------
 // Cleanup
 
 if ($options['pass'] === NULL || $options['pass'] == end($passes)) {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to