| 1 |
lars |
1 |
@echo off
|
|
|
2 |
|
|
|
3 |
rem *************************************************************
|
|
|
4 |
rem ** CLI for Windows based systems (based on phing.bat)
|
|
|
5 |
rem *************************************************************
|
|
|
6 |
|
|
|
7 |
rem This script will do the following:
|
|
|
8 |
rem - check for PHP_COMMAND env, if found, use it.
|
|
|
9 |
rem - if not found detect php, if found use it, otherwise err and terminate
|
|
|
10 |
|
|
|
11 |
if "%OS%"=="Windows_NT" @setlocal
|
|
|
12 |
|
|
|
13 |
rem %~dp0 is expanded pathname of the current script under NT
|
|
|
14 |
set PRADO_DIR=%~dp0
|
|
|
15 |
|
|
|
16 |
goto init
|
|
|
17 |
|
|
|
18 |
:init
|
|
|
19 |
|
|
|
20 |
if "%PHP_COMMAND%" == "" goto no_phpcommand
|
|
|
21 |
|
|
|
22 |
IF EXIST ".\prado-cli.php" (
|
|
|
23 |
%PHP_COMMAND% -d html_errors=off -d open_basedir= -q ".\prado-cli.php" %1 %2 %3 %4 %5 %6 %7 %8 %9
|
|
|
24 |
) ELSE (
|
|
|
25 |
%PHP_COMMAND% -d html_errors=off -d open_basedir= -q "%PRADO_DIR%\prado-cli.php" %1 %2 %3 %4 %5 %6 %7 %8 %9
|
|
|
26 |
)
|
|
|
27 |
goto cleanup
|
|
|
28 |
|
|
|
29 |
:no_phpcommand
|
|
|
30 |
rem echo ------------------------------------------------------------------------
|
|
|
31 |
rem echo WARNING: Set environment var PHP_COMMAND to the location of your php.exe
|
|
|
32 |
rem echo executable (e.g. C:\PHP\php.exe). (assuming php.exe on PATH)
|
|
|
33 |
rem echo ------------------------------------------------------------------------
|
|
|
34 |
set PHP_COMMAND=php.exe
|
|
|
35 |
goto init
|
|
|
36 |
|
|
|
37 |
:cleanup
|
|
|
38 |
if "%OS%"=="Windows_NT" @endlocal
|
|
|
39 |
rem pause
|