summaryrefslogtreecommitdiff
path: root/lib/prado/bin/prado-cli.bat
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-02-24 23:18:07 +0100
committeremkael <emkael@tlen.pl>2016-02-24 23:18:07 +0100
commit6f7fdef0f500cd4bb540affd3bc1482243f337c1 (patch)
tree4853eecd0769a903e6130c1896e1d070848150dd /lib/prado/bin/prado-cli.bat
parent61f2ea48a4e11cb5fb941b3783e19c9e9ef38a45 (diff)
* Prado 3.3.0
Diffstat (limited to 'lib/prado/bin/prado-cli.bat')
-rw-r--r--lib/prado/bin/prado-cli.bat39
1 files changed, 39 insertions, 0 deletions
diff --git a/lib/prado/bin/prado-cli.bat b/lib/prado/bin/prado-cli.bat
new file mode 100644
index 0000000..38d0285
--- /dev/null
+++ b/lib/prado/bin/prado-cli.bat
@@ -0,0 +1,39 @@
+@echo off
+
+rem *************************************************************
+rem ** CLI for Windows based systems (based on phing.bat)
+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
+
+if "%OS%"=="Windows_NT" @setlocal
+
+rem %~dp0 is expanded pathname of the current script under NT
+set PRADO_DIR=%~dp0
+
+goto init
+
+:init
+
+if "%PHP_COMMAND%" == "" goto no_phpcommand
+
+IF EXIST ".\prado-cli.php" (
+ %PHP_COMMAND% -d html_errors=off -d open_basedir= -q ".\prado-cli.php" %1 %2 %3 %4 %5 %6 %7 %8 %9
+) ELSE (
+ %PHP_COMMAND% -d html_errors=off -d open_basedir= -q "%PRADO_DIR%\prado-cli.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
+
+:cleanup
+if "%OS%"=="Windows_NT" @endlocal
+rem pause