initial commit

This commit is contained in:
Chris Sewell
2012-11-28 03:55:08 -05:00
parent 7adb399b2e
commit cf140a2e97
3247 changed files with 492437 additions and 0 deletions

View File

@ -0,0 +1,67 @@
#!/bin/sh
# Shell wrapper for Propel generator
# $Id$
#
# This script will do the following:
# - check for PHING_COMMAND env, if found, use it.
# - if not found assume php is on the path
# - check for PROPEL_GEN_HOME evn, if found use it
# - if not look for it
if [ -z "$PROPEL_GEN_HOME" ] ; then
# echo "WARNING: PROPEL_GEN_HOME environment not set. Attempting to guess."
# try to find Propel
if [ -d /opt/propel/generator ] ; then
PROPEL_GEN_HOME=/opt/propel/generator
fi
if [ -d "${HOME}/opt/propel/generator" ] ; then
PROPEL_GEN_HOME="${HOME}/opt/propel/generator"
fi
if [ -d "/usr/local/propel/generator" ] ; then
PROPEL_GEN_HOME="/usr/local/propel/generator"
fi
if [ -d "${HOME}/usr/propel/generator" ] ; then
PROPEL_GEN_HOME="${HOME}/usr/propel/generator"
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
PROPEL_GEN_HOME=`dirname "$PRG"`/..
cd "$saveddir"
# make it fully qualified
PROPEL_GEN_HOME=`cd "$PROPEL_GEN_HOME" && pwd`
# make it available in PHP via getenv("PROPEL_GEN_HOME")
export PROPEL_GEN_HOME
fi
if (test -z "$PHING_COMMAND") ; then
# echo "WARNING: PHING_COMMAND environment not set. (Assuming phing on PATH)"
export PHING_COMMAND="phing"
fi
$PHING_COMMAND -f $PROPEL_GEN_HOME/build.xml -Dusing.propel-gen=true -Dproject.dir=$*

View File

@ -0,0 +1,47 @@
@echo off
rem *********************************************************************
rem ** The Propel generator convenience script for Windows based systems
rem ** $Id$
rem *********************************************************************
rem This script will do the following:
rem - check for PHING_COMMAND env, if found, use it.
rem - if not found detect php, if found use it, otherwise err and terminate
rem - check for PROPEL_GEN_HOME evn, if found use it
rem - if not found error and leave
if "%OS%"=="Windows_NT" @setlocal
rem %~dp0 is expanded pathname of the current script under NT
set DEFAULT_PROPEL_GEN_HOME=%~dp0..
goto init
goto cleanup
:init
if "%PROPEL_GEN_HOME%" == "" set PROPEL_GEN_HOME=%DEFAULT_PROPEL_GEN_HOME%
set DEFAULT_PROPEL_GEN_HOME=
if "%PHING_COMMAND%" == "" goto no_phingcommand
goto run
goto cleanup
:run
%PHING_COMMAND% -f %PROPEL_GEN_HOME%\build.xml -Dusing.propel-gen=true -Dproject.dir=%*
goto cleanup
:no_phingcommand
REM echo ------------------------------------------------------------------------
REM echo WARNING: Set environment var PHING_COMMAND to the location of your phing
REM echo executable (e.g. C:\PHP\phing.bat).
REM echo Proceeding with assumption that phing.bat is on Path
REM echo ------------------------------------------------------------------------
set PHING_COMMAND=phing.bat
goto init
:cleanup
if "%OS%"=="Windows_NT" @endlocal
REM pause