From bf41d24477d0d13f2bdb1cc87f645ef9f1f4de7b Mon Sep 17 00:00:00 2001 From: xue <> Date: Mon, 19 Jun 2006 02:34:25 +0000 Subject: Added phing --- buildscripts/phing/bin/pear-phing | 22 ++++++++++ buildscripts/phing/bin/pear-phing.bat | 44 ++++++++++++++++++++ buildscripts/phing/bin/phing | 75 +++++++++++++++++++++++++++++++++++ buildscripts/phing/bin/phing.bat | 58 +++++++++++++++++++++++++++ buildscripts/phing/bin/phing.php | 50 +++++++++++++++++++++++ 5 files changed, 249 insertions(+) create mode 100644 buildscripts/phing/bin/pear-phing create mode 100644 buildscripts/phing/bin/pear-phing.bat create mode 100644 buildscripts/phing/bin/phing create mode 100644 buildscripts/phing/bin/phing.bat create mode 100644 buildscripts/phing/bin/phing.php (limited to 'buildscripts/phing/bin') diff --git a/buildscripts/phing/bin/pear-phing b/buildscripts/phing/bin/pear-phing new file mode 100644 index 00000000..bf568c17 --- /dev/null +++ b/buildscripts/phing/bin/pear-phing @@ -0,0 +1,22 @@ +#!/bin/sh + +# ------------------------------------------------------------------------ +# The phing build script for Unix based systems +# $Id: pear-phing,v 1.3 2003/12/23 19:45:14 hlellelid Exp $ +# ------------------------------------------------------------------------ + +# Change this to reflect your environment if the default value doesn't work +PHP_COMMAND="@PHP-BIN@" +export PHP_COMMAND + +# ------------------------------------------------------------------------- +# Do not change anything below this line unless you know what you're doing. +# ------------------------------------------------------------------------- + +if (test -z "$PHP_COMMAND") ; then + echo "WARNING: PHP_COMMAND environment not set. (Assuming php on PATH)" + PHP_COMMAND=php + export PHP_COMMAND +fi + +$PHP_COMMAND -d html_errors=off -qC @PEAR-DIR@/phing.php -logger phing.listener.AnsiColorLogger $* diff --git a/buildscripts/phing/bin/pear-phing.bat b/buildscripts/phing/bin/pear-phing.bat new file mode 100644 index 00000000..fba90772 --- /dev/null +++ b/buildscripts/phing/bin/pear-phing.bat @@ -0,0 +1,44 @@ +@ECHO OFF + +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +:: The phing build script for Windows based systems +:: $Id: pear-phing.bat,v 1.4 2005/12/22 13:12:33 hlellelid Exp $ +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: + +::---------------------------------------------------------------------------------- +:: Please set following to PHP's CLI +:: NOTE: In PHP 4.2.x the PHP-CLI used to be named php-cli.exe. +:: PHP 4.3.x names it php.exe but stores it in a subdir called /cli/php.exe +:: E.g. for PHP 4.2 C:\phpdev\php-4.2-Win32\php-cli.exe +:: for PHP 4.3 C:\phpdev\php-4.3-Win32\cli\php.exe + + SET phpCli=@PHP-BIN@ + +::--------------------------------------------------------------------------------- +::--------------------------------------------------------------------------------- +:: Do not modify below this line!! (Unless you know what your doing :) +::--------------------------------------------------------------------------------- +::--------------------------------------------------------------------------------- + +:: Check existence of php.exe +IF EXIST "%phpCli%" ( + SET doNothing= +) ELSE GOTO :NoPhpCli + +"%phpCli%" -d html_errors=off -qC "@PEAR-DIR@\phing.php" %* +GOTO :EOF + +:: +:: php.exe not found error +GOTO :PAUSE_END +:NoPhpCli +ECHO ** ERROR ***************************************************************** +ECHO * Sorry, can't find the php.exe file. +ECHO * You must edit this file to point to your php.exe (CLI version!) +ECHO * [Currently set to %phpCli%] +ECHO ************************************************************************** + +GOTO :PAUSE_END + +:PAUSE_END +PAUSE \ No newline at end of file diff --git a/buildscripts/phing/bin/phing b/buildscripts/phing/bin/phing new file mode 100644 index 00000000..e24c6cfb --- /dev/null +++ b/buildscripts/phing/bin/phing @@ -0,0 +1,75 @@ +#!/bin/sh +# Shell wrapper for Phing +# $Id: phing,v 1.2 2006/01/23 21:51:16 mrook Exp $ +# +# This script will do the following: +# - check for PHP_COMMAND env, if found, use it. +# - if not found assume php is on the path +# - check for PHING_HOME evn, if found use it +# - if not look for it +# - check for PHP_CLASSPATH, if found use it +# - if not found set it using PHING_HOME/classes + +if [ -z "$PHING_HOME" ] ; then + + # echo "WARNING: PHING_HOME environment not set. Attempting to guess." + + # try to find PHING + if [ -d /opt/phing ] ; then + PHING_HOME=/opt/phing + fi + + if [ -d "${HOME}/opt/phing" ] ; then + PHING_HOME="${HOME}/opt/phing" + fi + + if [ -d "/usr/local/phing" ] ; then + PHING_HOME="/usr/local/phing" + fi + + if [ -d "${HOME}/usr/phing" ] ; then + PHING_HOME="${HOME}/usr/phing" + fi + + ## resolve links - $0 may be a link to phing's home + PRG="$0" + progname=`basename "$0"` + saveddir=`pwd` + + # need this for relative symlinks + dirname_prg=`dirname "$PRG"` + cd "$dirname_prg" + + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi + done + + PHING_HOME=`dirname "$PRG"`/.. + + cd "$saveddir" + + # make it fully qualified + PHING_HOME=`cd "$PHING_HOME" && pwd` + + # make it available in PHP via getenv("PHING_HOME") + export PHING_HOME +fi + +if (test -z "$PHP_COMMAND") ; then + # echo "WARNING: PHP_COMMAND environment not set. (Assuming php on PATH)" + PHP_COMMAND=php + export PHP_COMMAND +fi + +if (test -z "$PHP_CLASSPATH") ; then + PHP_CLASSPATH=$PHING_HOME/classes + export PHP_CLASSPATH +fi + +$PHP_COMMAND -d html_errors=off -qC $PHING_HOME/bin/phing.php -logger phing.listener.AnsiColorLogger $@ diff --git a/buildscripts/phing/bin/phing.bat b/buildscripts/phing/bin/phing.bat new file mode 100644 index 00000000..c57c30dd --- /dev/null +++ b/buildscripts/phing/bin/phing.bat @@ -0,0 +1,58 @@ +@echo off + +rem ********************************************************************* +rem ** the phing build script for Windows based systems +rem ** $Id: phing.bat,v 1.5 2003/11/06 14:56:13 hlellelid Exp $ +rem ********************************************************************* + +rem This script will do the following: +rem - check for PHP_COMMAND env, if found, use it. +rem - if not found detect php, if found use it, otherwise err and terminate +rem - check for PHING_HOME evn, if found use it +rem - if not found error and leave +rem - check for PHP_CLASSPATH, if found use it +rem - if not found set it using PHING_HOME/classes + +if "%OS%"=="Windows_NT" @setlocal + +rem %~dp0 is expanded pathname of the current script under NT +set DEFAULT_PHING_HOME=%~dp0.. + +goto init +goto cleanup + +:init + +if "%PHING_HOME%" == "" set PHING_HOME=%DEFAULT_PHING_HOME% +set DEFAULT_PHING_HOME= + +if "%PHP_COMMAND%" == "" goto no_phpcommand +if "%PHP_CLASSPATH%" == "" goto set_classpath + +goto run +goto cleanup + +:run +%PHP_COMMAND% -d html_errors=off -qC %PHING_HOME%\bin\phing.php %1 %2 %3 %4 %5 %6 %7 %8 %9 +goto cleanup + +:no_phpcommand +REM echo ------------------------------------------------------------------------ +REM echo WARNING: Set environment var PHP_COMMAND to the location of your php.exe +REM echo executable (e.g. C:\PHP\php.exe). (Assuming php.exe on Path) +REM echo ------------------------------------------------------------------------ +set PHP_COMMAND=php.exe +goto init + +:err_home +echo ERROR: Environment var PHING_HOME not set. Please point this +echo variable to your local phing installation! +goto cleanup + +:set_classpath +set PHP_CLASSPATH="%PHING_HOME%\classes" +goto init + +:cleanup +if "%OS%"=="Windows_NT" @endlocal +REM pause diff --git a/buildscripts/phing/bin/phing.php b/buildscripts/phing/bin/phing.php new file mode 100644 index 00000000..880adf41 --- /dev/null +++ b/buildscripts/phing/bin/phing.php @@ -0,0 +1,50 @@ + \ No newline at end of file -- cgit v1.2.3