removed mods directory from the ATutor codebase
[atutor.git] / mods / phpdoc2 / PhpDocumentor / scripts / add_cvs.php
diff --git a/mods/phpdoc2/PhpDocumentor/scripts/add_cvs.php b/mods/phpdoc2/PhpDocumentor/scripts/add_cvs.php
deleted file mode 100644 (file)
index 151804c..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-<?php\r
-//\r
-// +------------------------------------------------------------------------+\r
-// | phpDocumentor                                                          |\r
-// +------------------------------------------------------------------------+\r
-// | Copyright (c) 2000-2003 Joshua Eichorn, Gregory Beaver                 |\r
-// | Email         jeichorn@phpdoc.org, cellog@phpdoc.org                   |\r
-// | Web           http://www.phpdoc.org                                    |\r
-// | Mirror        http://phpdocu.sourceforge.net/                          |\r
-// | PEAR          http://pear.php.net/package/PhpDocumentor                |\r
-// +------------------------------------------------------------------------+\r
-// | This source file is subject to version 3.00 of the PHP License,        |\r
-// | that is available at http://www.php.net/license/3_0.txt.               |\r
-// | If you did not receive a copy of the PHP license and are unable to     |\r
-// | obtain it through the world-wide-web, please send a note to            |\r
-// | license@php.net so we can mail you a copy immediately.                 |\r
-// +------------------------------------------------------------------------+\r
-//\r
-/**\r
- * CVS file adding iterator\r
- *\r
- * This file iterates over a directory, and adds everything to CVS that is\r
- * found, ignoring any error messages, until all files in each directory\r
- * and subdirectory have been added to cvs.  It then commits the files to cvs\r
- * @package phpDocumentor\r
- * @author Greg Beaver <cellog@php.net>\r
- * @copyright Copyright 2003, Greg Beaver\r
- * @version 1.0\r
- */\r
-/**#@+\r
- * phpDocumentor include files.  If you don't have phpDocumentor, go get it!\r
- * Your php life will be changed forever\r
- */\r
-$dir = realpath(dirname(__FILE__).'/..');\r
-require_once("$dir/phpDocumentor/common.inc.php");\r
-require_once("$dir/phpDocumentor/Io.inc");\r
-/**#@-*/\r
-\r
-/**\r
-* Physical location on this computer of the package to parse\r
-* @global string $cvsadd_directory\r
-*/\r
-$cvsadd_directory = realpath('.');\r
-/**\r
-* Comma-separated list of files and directories to ignore\r
-*\r
-* This uses wildcards * and ? to remove extra files/directories that are\r
-* not part of the package or release\r
-* @global string $ignore\r
-*/\r
-$ignore = array('CVS/');\r
-\r
-/******************************************************************************\r
-*       Don't change anything below here unless you're adventuresome          *\r
-*******************************************************************************/\r
-\r
-/**\r
- * @global Io $files\r
- */\r
-$files = new Io;\r
-\r
-$allfiles = $files->dirList($cvsadd_directory);\r
-/**#@+\r
- * Sorting functions for the file list\r
- * @param string\r
- * @param string\r
- */\r
-function sortfiles($a, $b)\r
-{\r
-       return strnatcasecmp($a['file'],$b['file']);\r
-}\r
-\r
-function mystrucsort($a, $b)\r
-{\r
-       if (is_numeric($a) && is_string($b)) return 1;\r
-       if (is_numeric($b) && is_string($a)) return -1;\r
-       if (is_numeric($a) && is_numeric($b))\r
-       {\r
-               if ($a > $b) return 1;\r
-               if ($a < $b) return -1;\r
-               if ($a == $b) return 0;\r
-       }\r
-       return strnatcasecmp($a,$b);\r
-}\r
-/**#@-*/\r
-\r
-$struc = array();\r
-foreach($allfiles as $file)\r
-{\r
-       if ($files->checkIgnore(basename($file),dirname($file),$ignore, false))\r
-    {\r
-//        print 'Ignoring '.$file."<br>\n";\r
-        continue;\r
-    }\r
-       $path = substr(dirname($file),strlen(str_replace('\\','/',realpath($cvsadd_directory)))+1);\r
-       if (!$path) $path = '/';\r
-       $file = basename($file);\r
-       $ext = array_pop(explode('.',$file));\r
-       if (strlen($ext) == strlen($file)) $ext = '';\r
-       $struc[$path][] = array('file' => $file,'ext' => $ext);\r
-}\r
-uksort($struc,'strnatcasecmp');\r
-foreach($struc as $key => $ind)\r
-{\r
-       usort($ind,'sortfiles');\r
-       $struc[$key] = $ind;\r
-}\r
-$tempstruc = $struc;\r
-$struc = array('/' => $tempstruc['/']);\r
-$bv = 0;\r
-foreach($tempstruc as $key => $ind)\r
-{\r
-       $save = $key;\r
-       if ($key != '/')\r
-       {\r
-        $struc['/'] = setup_dirs($struc['/'], explode('/',$key), $tempstruc[$key]);\r
-       }\r
-}\r
-uksort($struc['/'],'mystrucsort');\r
-/**\r
- * Recursively add files to cvs\r
- * @param array the sorted directory structure\r
- */\r
-function addToCVS($struc)\r
-{\r
-       foreach($struc as $dir => $files)\r
-       {\r
-               if ($dir === '/')\r
-               {\r
-            print 'processing '.$dir . "\n";\r
-                       addToCVS($struc[$dir]);\r
-                       return;\r
-               } else\r
-               {\r
-                       if (!isset($files['file']))\r
-                       {\r
-                print 'adding '.$dir . "\n";\r
-                system('cvs add '.$dir);\r
-                chdir($dir);\r
-                               addToCVS($files);\r
-                chdir('..');\r
-                       } else\r
-                       {\r
-                print 'adding '.$files['file'] . "\n";\r
-                system('cvs add '.$files['file']);\r
-                system('cvs commit -m "" '.$files['file']);\r
-                       }\r
-               }\r
-       }\r
-}\r
-addToCVS($struc);\r
-print "\n".'done';\r
-?>
\ No newline at end of file