Cleanup devtools directory
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 22 Nov 2010 04:38:48 +0000 (21:38 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 22 Nov 2010 18:35:55 +0000 (11:35 -0700)
framework/devtools/README
framework/devtools/horde-check-themes.php [deleted file]
framework/devtools/horde-rev-cmp.sh

index 773d414..78973ec 100644 (file)
@@ -10,17 +10,6 @@ distribution.
 
 Script Index
 ~~~~~~~~~~~~
-horde-check-themes.php
-    Makes sure that themes that provide their own images aren't missing any.
-
-horde-fw-symlinks.php
-    Creates symbolic links necessary for developers to work directly on the
-    files in the framework module without needing to install the changed
-    packages.
-
-horde-highlight.php
-    Highlights source files on the console.
-
 horde-merge.php
     Merges commits from a commit message into the CVS tree of the current
     directory.
diff --git a/framework/devtools/horde-check-themes.php b/framework/devtools/horde-check-themes.php
deleted file mode 100755 (executable)
index ab0631a..0000000
+++ /dev/null
@@ -1,191 +0,0 @@
-#!@php_bin@
-<?php
-/**
- * This script does some checking to make sure images are synchronised
- * across themes.
- *
- * Copyright 2003-2010 The Horde Project (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (LGPL). If you
- * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
- *
- * @category Horde
- * @package  devtools
- * @author   Marko Djukic <marko@oblo.com>
- */
-
-require_once dirname(__FILE__) . '/../lib/Application.php';
-Horde_Registry::appInit('horde', array('authentication' => 'none', 'cli' => true));
-
-/* Get any options. */
-$simple = false;
-$horde_base = null;
-$ignore = array();
-if (isset($argv)) {
-    /* Get rid of the first arg which is the script name. */
-    array_shift($argv);
-    while ($arg = array_shift($argv)) {
-        if ($arg == '--help') {
-            print_usage();
-        } elseif ($arg == '-s') {
-            $simple = true;
-        } elseif (strpos($arg, '-i') === 0) {
-            list(,$ignore[]) = explode('=', $arg);
-        } elseif (file_exists($arg . '/config/registry.php')) {
-            $horde_base = $arg;
-        } else {
-            print_usage("Unrecognised option $arg");
-        }
-    }
-}
-
-if ($horde_base === null) {
-    print_usage("You must specify the base path to Horde.");
-}
-
-/* Get the apps and start doing checks. */
-$apps = $registry->listApps(array('hidden', 'notoolbar', 'active', 'admin'));
-
-/* Get a list of themes. */
-$themes = array();
-$themes_dir = $registry->get('themesfs', 'horde');
-if ($handle = opendir($themes_dir)) {
-    while ($file = readdir($handle)) {
-        if ($file == '.' || $file == '..' || $file == 'CVS' ||
-            $file == '.svn' ||
-            !file_exists("$themes_dir/$file/themed_graphics") ||
-            !file_exists("$themes_dir/$file/graphics")) {
-            continue;
-        }
-
-        /* Store the apps and their theme directories. */
-        foreach ($apps as $app) {
-            $dir = $registry->get('themesfs', $app) . '/' . $file . '/graphics';
-            if (is_dir($dir)) {
-                $themes[$app][$file] = $dir;
-            }
-        }
-    }
-}
-
-foreach ($apps as $app) {
-    /* Skip applications without icon themes. */
-    if (!isset($themes[$app])) {
-        continue;
-    }
-
-    /* Set up some dirs. */
-    $themes_dir = $registry->get('themesfs', $app);
-    $horde_icon_dir = $themes_dir . '/graphics';
-
-    /* Sanity check for the directories. */
-    if (!file_exists($horde_icon_dir)) {
-        continue;
-    }
-
-    /* Get a list of all horde images recursively. */
-    $horde_icon_list = array();
-    readDirRecursively($horde_icon_dir, $horde_icon_dir, $horde_icon_list);
-
-    /* Loop through themes that replace icons and check for differences. */
-    foreach ($themes[$app] as $theme => $theme_icon_dir) {
-        $theme_icon_list = array();
-        readDirRecursively($theme_icon_dir, $theme_icon_dir, $theme_icon_list);
-
-        /* Check for icons that are in the Horde base theme and not in the
-         * custom theme. */
-        $diff = array_diff($horde_icon_list, $theme_icon_list);
-        /* Don't bother reporting anything for themes that have all the horde
-         * base icons. */
-        if (empty($diff)) {
-            continue;
-        }
-
-        $cli->writeln($cli->red(sprintf('[%s] "%s" theme missing these icons:',
-                                strtoupper($app),
-                                $theme)));
-        sort($diff);
-        foreach ($diff as $icon) {
-            $cli->writeln($icon);
-        }
-
-        /* Check if only doing a Horde base theme to custom theme check. Skip
-         * the reverse checking if true. */
-        if ($simple) {
-            continue;
-        }
-
-        /* Check for icons that are in the Horde base theme and not in the
-         * custom theme. */
-        $diff = array_diff($theme_icon_list, $horde_icon_list);
-        /* Don't bother reporting anything for themes that don't have any icons
-         * more than the base theme. */
-        if (empty($diff)) {
-            continue;
-        }
-
-        $cli->writeln($cli->blue(sprintf('[%s] "%s" theme has these extra icons:',
-                                strtoupper($app),
-                                $theme)));
-        sort($diff);
-        foreach ($diff as $icon) {
-            $cli->writeln($icon);
-        }
-    }
-}
-
-$cli->writeln($cli->green('Done.'));
-exit;
-
-/**
- * Loops through the directory recursively and stores the found
- * graphics into an array.
- */
-function readDirRecursively($path, $basepath, &$list)
-{
-    global $ignore;
-
-    if ($handle = opendir($path)) {
-        while ($file = readdir($handle)) {
-            if ($file == '.' || $file == '..' ||
-                $file == 'CVS' || $file == '.svn') {
-                continue;
-            }
-            if (is_dir("$path/$file")) {
-                readDirRecursively("$path/$file", $basepath, $list);
-            } else {
-                foreach ($ignore as $pattern) {
-                    if (preg_match($pattern, $file)) {
-                        continue 2;
-                    }
-                }
-                $list[] = substr($path, strlen($basepath)) . "/$file";
-            }
-        }
-        closedir($handle);
-    }
-
-}
-
-function print_usage($message = '')
-{
-
-    if (!empty($message)) {
-        print "themes_check.php: $message\n\n";
-    }
-
-    print <<<USAGE
-Usage: themes_check.php [OPTION] /path/to/horde
-
-Possible options:
-  -s            Do only a simple check for any Horde base theme graphics that
-                are missing from the other themes, and no check of the
-                opposite.
-  -i=PATTERN    Insert any valid regex pattern to ignore files from being
-                checked. You can enter multiple -i options to include multiple
-                patterns. For example: -i="/xcf$/ to ignore any original
-                GIMP files.
-
-USAGE;
-    exit;
-}
index c384d05..17fb3b0 100755 (executable)
@@ -2,7 +2,8 @@
 #
 # Script to compare revisions and ignore files that should be different, and
 # differences in revision numbers.
-# Syntax: ./compare_revisions.sh FIRST_FOLDER SECOND_FOLDER ['ADDITIONAL PARAMETERS']
+#
+# Syntax: ./horde-rev-cmp.sh FIRST_FOLDER SECOND_FOLDER ['ADDITIONAL PARAMETERS']
 
 FIRST=$1
 SECOND=$2