Skip to content

Instantly share code, notes, and snippets.

@gooocho
Created August 23, 2013 09:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gooocho/6317135 to your computer and use it in GitHub Desktop.
Save gooocho/6317135 to your computer and use it in GitHub Desktop.
azu さんのespowerun.jsをキックするwindows用シェルスクリプト c.f. https://gist.github.com/azu/6309397
@echo off
if "%1"=="" (
echo "Usage: ./espowerun.cmd path/to/test.js"
exit
)
set tmpname=
set tmpdir=
FOR /L %%i IN (0 1 100) DO (
if not exist tmp%%i (
set tmpname=%%i
set tmpdir=tmp%%i
goto found
)
)
:found
mkdir %tmpdir%
node %~dp0\espowerun.js "%1" > %tmpdir%\%tmpname%.js
node /path/to/mocha/bin/mocha %tmpdir%
del /F /Q %tmpdir%
rmdir %tmpdir%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment