1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 05:02:40 +00:00

Scripts for Robo

This commit is contained in:
J. King 2017-12-08 15:15:20 -05:00
parent 4bc3398157
commit 11f4eed118
4 changed files with 23 additions and 19 deletions

6
robo Executable file
View file

@ -0,0 +1,6 @@
#! /bin/sh
base=`dirname "$0"`
roboCommand="$1"
shift
"$base/vendor/bin/robo" "$roboCommand" -- $*

17
robo.bat Normal file
View file

@ -0,0 +1,17 @@
@echo off
setlocal
set base=%~dp0
set roboCommand=%1
rem get all arguments except the first
shift
set "args="
:parse
if "%~1" neq "" (
set args=%args% %1
shift
goto :parse
)
if defined args set args=%args:~1%
call "%base%vendor\bin\robo" "%roboCommand%" -- %args%

View file

@ -1,8 +0,0 @@
#! /bin/sh
base=`dirname "$0"`
php -n -S localhost:8000 "$base/server.php" >/dev/null 2>/dev/null &
sleep 1s
"$base/../vendor/bin/phpunit" -c "$base/phpunit.xml" $*
sleep 1s
pid=`lsof -n -i:8000 | grep -Eo "php\s+[0-9]+" | grep -Eo "[0-9]+"`
kill $pid

View file

@ -1,11 +0,0 @@
@echo off
setlocal
set base=%~dp0
start /b php -n -S localhost:8000 "%base%server.php" >nul 2>nul
timeout /nobreak /t 1 >nul
call "%base%..\vendor\bin\phpunit" -c "%base%phpunit.xml" %*
timeout /nobreak /t 1 >nul
for /f "usebackq tokens=5" %%a in (`netstat -aon ^| find "LISTENING" ^| find ":8000"`) do (
taskkill /f /pid %%a >nul
goto :eof
)