steffen: server/kolab-horde-framework/kolab-horde-framework .htaccess, NONE, 1.1 install-packages.bat, NONE, 1.1 install-packages.php, NONE, 1.1

cvs at intevation.de cvs at intevation.de
Fri Oct 14 16:33:05 CEST 2005


Author: steffen

Update of /kolabrepository/server/kolab-horde-framework/kolab-horde-framework
In directory doto:/tmp/cvs-serv28903/kolab-horde-framework/kolab-horde-framework

Added Files:
	.htaccess install-packages.bat install-packages.php 
Log Message:
Separated Horde Framework from kolab-resource-handlers

--- NEW FILE: .htaccess ---
Deny from all

--- NEW FILE: install-packages.bat ---
@echo off
:: ----------------------------------------------------------------------
:: Copyright (c) 2003 Peter Magnusson (kmpm at telia.com)
:: ----------------------------------------------------------------------
::  Author: Peter Magnusson (kmpm at telia.com)
:: ----------------------------------------------------------------------
::
:: You must have PHP PEAR installed to successfully use this script.
:: Please check that you have the environment variables
:: PHP_PEAR_BIN_DIR and PHP_PEAR_PHP_BIN set to the correct paths.
:: 

:: Uncomment and modify the lines below to match your PHP installation
:: Check environment variables
:: if "%PHP_CLI_BIN%"=="" set PHP_PEAR_PHP_BIN=C:\php\cli\php.exe
:: if "%PHP_PEAR_BIN_DIR%"=="" set PHP_PEAR_BIN_DIR=C:\PHP
 
:: Check that the files and folders exist
if not exist "%PHP_PEAR_BIN_DIR%" GOTO DIR_ERROR
if not exist "%PHP_PEAR_PHP_BIN%" GOTO BIN_ERROR

:: launch Horde install-packages.php
goto INSTALL

:DIR_ERROR
	echo PHP_PEAR_BIN_DIR is not set correctly.
	echo The current value is:%PHP_PEAR_BIN_DIR%
	goto END

:BIN_ERROR
	echo PHP_PEAR_PHP_BIN is not set correctly.
	echo The current value is:%PHP_PEAR_PHP_BIN%
	goto END

:INSTALL
	::Save the current path so that we can modify it and restore it later
	set OLD_PATH=%PATH%
	::Set the new path with PHP_PEAR_BIN_DIR included
	set PATH=%PATH%;%PHP_PEAR_BIN_DIR%
	"%PHP_PEAR_PHP_BIN%" -C -d output_buffering=1 -d include_path="%PHP_PEAR_BIN_DIR%" -f "install-packages.php"
	::Restore the path to the previous 
	set PATH=%OLD_PATH%
:END
	::Pause to display information
	pause

--- NEW FILE: install-packages.php ---
#!@l_prefix@/bin/php
<?php
/**
 * $Horde: framework/install-packages.php,v 1.13 2004/04/07 17:43:41 chuck Exp $
 *
 * This script iterates each directory and forces an install from the
 * package.xml file for each package.
 *
 * @package Horde_Framework
 */

/* Don't die if time limit exceeded. */
set_time_limit(0);

/* Get any arguments. */
require_once 'Console/Getopt.php';
$args = Console_Getopt::readPHPArgv();
$options = Console_Getopt::getopt($args, 'd:c:', array('install-dir=', 'config='));
if (PEAR::isError($options)) {
    echo "Bad option\n";
    exit;
}

/* Set these options to empty by default. */
$install_dir = '';
$config_file = '';
foreach ($options[0] as $option) {
    switch ($option[0]) {
    case 'd':
    case '--install-dir':
        /* Alternate install directory requested. */
        $install_dir = ' -d php_dir=' . $option[1] .
                       ' -d test_dir=' . $option[1] . '/tests' .
                       ' -d doc_dir=' . $option[1] . '/doc' .
                       ' -d data_dir=' . $option[1] . '/data' .
                       ' -d bin_dir=' . $option[1] . '/bin';
        break;
    case 'c':
    case '--config':
        /* Alternate config file requested. */
        $config_file = ' -c ' . $option[1];
    }
}

/* Overwrite old files, ignore dependancies (for ease of ordering),
 * upgrade if already installed, etc. */
$pear = '@l_prefix@/bin/pear' . $config_file . $install_dir . ' install --force --nodeps';

$dir = dirname(__FILE__);
$dh = opendir($dir);
while (($entry = readdir($dh)) !== false) {
    if ($entry == '.' || $entry == '..' || !is_dir($dir . '/' . $entry)) {
        continue;
    }

    $package = $dir . '/' . $entry . '/' . 'package.xml';
    if (file_exists($package)) {
        echo "Installing $entry:\n";
	#echo "$pear \"$package\"\n";
        system("$pear \"$package\"");
        echo "\n\n";
    }
}
closedir($dh);





More information about the commits mailing list