--1066:xp:-- #!/bin/sh # Include xprt DIRNAME=$(dirname $(realpath "$0")) . "$DIRNAME"/xprt # Initialite OPTIND=0 INCLUDE="" INCLUDE_PATH="" RUNNER="xp" # Parse arguments for arg in "$@" ; do if [ ! -z "$INCLUDE_ARG" ] ; then INCLUDE="$arg$INCLUDE_ARG$INCLUDE" ; INCLUDE_ARG="" OPTIND=`expr $OPTIND + 2` continue fi case $arg in -v) # Display version RUNNER="xpv" OPTIND=`expr $OPTIND + 1` ;; -cp) # Add class path INCLUDE_ARG=${PATHSEP} ;; -e) # Run source passed via command line RUNNER="xpe" OPTIND=`expr $OPTIND + 1` ;; -xar) # Run a xar RUNNER="xar" OPTIND=`expr $OPTIND + 1` ;; -*) # Any other arg echo "*** Invalid argument $arg" echo ${USAGE} exit ;; *) # First arg we find that does not begin with a "-" break ;; esac done # Execute shift $OPTIND cmd=$(execute "$DIRNAME" "$RUNNER" "$INCLUDE") # DEBUG { echo "### $cmd ###" } $cmd "$@" --132:xpcli:-- #!/bin/sh # Include xprt DIRNAME=$(dirname $(realpath "$0")) . "$DIRNAME"/xprt $(execute "$DIRNAME" "xp" "") util.cmd.Runner "$@" --157:xar:-- #!/bin/sh # Include xprt DIRNAME=$(dirname $(realpath "$0")) . "$DIRNAME"/xprt $(execute "$DIRNAME" "xp" "") util.cmd.Runner net.xp_framework.xar.Xar "$@" --179:unittest:-- #!/bin/sh # Include xprt DIRNAME=$(dirname $(realpath "$0")) . "$DIRNAME"/xprt $(execute "$DIRNAME" "xp" "") util.cmd.Runner net.xp_framework.unittest.runner.cli.CliRunner "$@" --1454:xprt:-- #!/bin/sh # # $Id: xprt 10256 2008-06-02 17:21:33Z friebe $ if [ "$OS" = "Windows_NT" ]; then PATHSEP=';' DIRSEP='\' else PATHSEP=':' DIRSEP='/' fi translate_path() { local base="$1" local path="$2" case "$path" in ~*) path=$HOME$DIRSEP${path#"~"} ;; # ~/lib .*) path=$base$DIRSEP$path ;; # ../lib, ./classes esac if [ "$OS" = "Windows_NT" ]; then echo $(cygpath -m "$path") else echo $path fi } add_path_file () { local base="$1" local file="$2" local includes="" for l in `grep -v ^# $file` ; do includes=$includes$(translate_path "$base" "$l")$PATHSEP done echo $includes } scan_path_files() { local dir="$1" local includes="" if [ ! -d "$dir" ] ; then return ""; fi for i in `ls "$dir"/*.pth 2>/dev/null` ; do includes=$includes$(add_path_file "$dir" "$i") done echo $includes } execute() { local base="$1" local runner="$2" local include="$3" local includes=$(scan_path_files "$base") if [ -z $includes ] ; then echo "*** Error loading boot class path in $base" >&2; return 1 fi if [ ! -z "$include" ] ; then includes=$includes$include$PATHSEP fi local local_includes=$(scan_path_files ".") if [ -z $local_includes ] ; then includes=$includes"." else includes=$includes$local_includes fi echo "php -dinclude_path=\"$includes\" $(translate_path "$base" ".")$DIRSEP$runner.php" } --160:xp.php:-- getMethod('main')->invoke(NULL, array(array_slice($argv, 2)))); ?> --132:xpe.php:-- --395:xpv.php:-- getResource('VERSION')), phpversion(), zend_version(), php_uname() ); Console::writeLine('Copyright (c) 2001-2008 the XP group'); foreach (ClassLoader::getLoaders() as $delegate) { Console::writeLine($delegate); } ?> --368:xar.php:-- getResource('META-INF/manifest.ini')); exit(XPClass::forName($pr->readString('archive', 'main-class'), $cl)->getMethod('main')->invoke(NULL, array(array_slice($argv, 2)))); ?>