Created
June 13, 2011 08:36
-
-
Save Andrewsville/1022468 to your computer and use it in GitHub Desktop.
Run PHP in each subdirectory with given options
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| SETLOCAL ENABLEEXTENSIONS | |
| REM CALL :process FOR ALL FOUND DIRECTORIES | |
| FOR /D %%a IN (*) DO ( | |
| SET version=%%a | |
| CALL :process %* | |
| ) | |
| ENDLOCAL | |
| GOTO :eof | |
| :process | |
| REM OUTPUT PHP VERSION | |
| FOR /F "delims=" %%a IN ('CALL %CD%\%version%\php.exe -v') DO ( | |
| ECHO %%a | |
| GOTO :call | |
| ) | |
| REM RUN THE ACTUAL COMMAND | |
| :call | |
| CALL %CD%\%version%\php.exe %* | |
| GOTO :eof |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment