Re: Though shall Phing no more

Manuel Holtgrewe <[email protected]> Sat, 12 Mar 2005 19:36:22 +0100
Newsgroups gmane.comp.lib.binarycloud.devel
Message-ID <[email protected]>
The files I forgot to attach.

*m

_______________________________________________
dev mailing list
dev-PnctHDZWAvB/Cz2I37pSEPZ4XP/[email protected]
http://lists.binarycloud.com/mailman/listinfo/dev
binarycloud.php (text/html, 2.7 KB)
<?php
// {{{ Header
/* -File        $Id: binarycloud.php 8073 2004-08-30 12:19:45Z purestorm $
 * -License     LGPL (http://www.gnu.org/copyleft/lesser.html)
 * -Copyright   2002, turing
 * -Author      alex, <[email protected]>
 * -Author      odysseas tsatalos, <odysseas-/[email protected]>
 * -Author      andreas aderhold, <[email protected]>
 * -Author      jean-christophe michel, <jc dot michel at symetrie dot com>
 * -Author      manuel holtgrewe, <purestorm at teforge dot org>
 */
// }}}

/**
 * @package binarycloud.init
 */

// PHP < 4.3.0 support
if (!defined("PATH_SEPARATOR")) {
    if (strtoupper(substr(PHP_OS,0,3)) == 'WIN') {
        define('PATH_SEPARATOR', ';');
    } else {
        define('PATH_SEPARATOR', ':');
    }
}

/* This file defines path constants that are set by Phing at build
 * time.
 */

// reserved bc constants
/*if(!defined('BC_LANG'))         define('BC_LANG',         '@BC_LANG@');
if(!defined('BC_LANGUAGES'))    define('BC_LANGUAGES',    '@BC_LANGUAGES@');
if(!defined('BC_PROJECT_NAME')) define('BC_PROJECT_NAME', '@BC_PROJECT_NAME@');
if(!defined('BC_BASE_URL'))     define('BC_BASE_URL',     '@BC_BASE_URL@');*/

// base paths
/*define('BC_PATH',        '@BC_PATH@');        // [build_dir]
define('BC_PATH_LANG',   BC_PATH . '/' . BC_LANG );   // [build_dir]/[lang]
define('BC_PATH_BASE',   BC_PATH . '/' . BC_LANG . '/' . 'binarycloud');   // [build_dir]/[lang]/binarycloud
define('BC_PATH_TMP',    BC_PATH . '/' . BC_LANG . '/' . 'tmp');    // [build_dir]/[lang]/tmp
define('BC_PATH_UPLOADS',BC_PATH . '/' . BC_LANG . '/' . 'uploads');    // [build_dir]/[lang]/uploads
define('BC_PATH_LOGS',   BC_PATH . '/' . BC_LANG . '/' . 'logs');    // [build_dir]/[lang]/logs
define('BC_PATH_HTDOCS', BC_PATH . '/' . 'htdocs' . '/' . BC_LANG); // [build_dir]/[htdocs]/[lang]
define('BC_PATH_CACHE',   BC_PATH_TMP . DIRECTORY_SEPARATOR . 'cache');*/

define('BC_PATH', realpath(dirname(__FILE__) . '/../../binarycloud')); // HACKY
define('BC_PATH_BASE', realpath(dirname(__FILE__) . '/../..'));
define('BC_PATH_WORKSPACE', realpath(dirname(__FILE__). '/..'));
define('BC_PATH_TMP',    BC_PATH_WORKSPACE . '/tmp');    // [build_dir]/[lang]/tmp
define('BC_PATH_CACHE', BC_PATH_TMP . '/cache');

define('BC_BASE_URL', '/~manuel/testsite');
define('BC_PROJECT_NAME', 'testsite');
define('BC_LANGUAGES', 'en');
define('BC_LANG', 'en');

// set include path
set_include_path(get_include_path() . PATH_SEPARATOR . BC_PATH_BASE . PATH_SEPARATOR . BC_PATH_WORKSPACE);

// require functions.php
require_once('binarycloud/init/functions.php');


/*
 * Local Variables:
 * mode: php
 * tab-width: 4
 * c-basic-offset: 4
 * End:
 */
?>
bootstrap.sh (text/plain, 1.1 KB)
#!/bin/sh

BCHOME=`pwd`
BCHOME="$BCHOME/../binarycloud"
BCVORTEX=`pwd`
BCVORTEX="$BCVORTEX/../vortex"

echo "Removing tmp directories..."
#chmod -R 4777 tmp
sudo rm -rf tmp
echo "Removing resources directories..."
rm -rf htdocs/resources

echo "Recreating tmp directories..."
mkdir tmp
mkdir tmp/cache
mkdir tmp/smarty
mkdir tmp/smarty/bin
mkdir tmp/smarty/cache
chmod -R 0777 tmp

echo "Creating resources directories..."
mkdir htdocs/resources
mkdir htdocs/resources/binarycloud
for file in `ls $BCHOME`;
do
  if [ -d "$BCHOME/$file/resources" ] 
  then
    ln -s "$BCHOME/$file/resources" htdocs/resources/binarycloud/$file
  fi
done

mkdir htdocs/resources/vortex
for file in `ls $BCVORTEX`;
do
  if [ -d "$BCVORTEX/$file/resources" ] 
  then
    ln -s "$BCVORTEX/$file/resources" htdocs/resources/vortex/$file
  fi
done

PWD=`pwd`
mkdir htdocs/resources/app
for file in `ls app`;
do
  if [ -d "$PWD/app/$file/resources" ] 
  then
    ln -s "$PWD/app/$file/resources" htdocs/resources/app/$file
  fi
done

# echo "Copying binarycloud.php from init"
#cp $BCHOME/init/binarycloud.php htdocs