diff options
author | Ben <leebenjp@gmail.com> | 2011-08-10 14:29:31 -0500 |
---|---|---|
committer | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2011-09-01 20:31:50 +0200 |
commit | 9abc294947392843b69be8fe4ddc44662a2ef420 (patch) | |
tree | 7a10469d2c879df02586784535e8e96883ee69db /priv | |
parent | a58f2c91e35be940a0b60c7a4572cd7a96ca1f8c (diff) |
Clean up windows batch scripts
Diffstat (limited to 'priv')
-rw-r--r-- | priv/templates/simplenode.windows.runner.cmd | 15 | ||||
-rw-r--r-- | priv/templates/simplenode.windows.start_erl.cmd | 3 |
2 files changed, 6 insertions, 12 deletions
diff --git a/priv/templates/simplenode.windows.runner.cmd b/priv/templates/simplenode.windows.runner.cmd index 366b640..b5a3a5f 100644 --- a/priv/templates/simplenode.windows.runner.cmd +++ b/priv/templates/simplenode.windows.runner.cmd @@ -1,14 +1,14 @@ -@rem Do not use "echo off" to not affect any child calls. @setlocal @set node_name={{nodeid}} -@rem Get the abolute path to the parent directory, which is assumed to be the node root. +@rem Get the abolute path to the parent directory, +@rem which is assumed to be the node root. @for /F "delims=" %%I in ("%~dp0..") do @set node_root=%%~fI @set releases_dir=%node_root%\releases -@rem parse ERTS version and release version from start_erl.dat +@rem Parse ERTS version and release version from start_erl.data @for /F "tokens=1,2" %%I in (%releases_dir%\start_erl.data) do @( @call :set_trim erts_version %%I @call :set_trim release_version %%J @@ -23,8 +23,7 @@ @if "%1"=="start" @goto start @if "%1"=="stop" @goto stop @if "%1"=="restart" @call :stop && @goto start -@rem @if "%1"=="attach" @goto attach -@rem TODO: ping, restart and reboot? +@rem TODO: attach, ping, restart and reboot :usage @echo Usage: %0 {install|uninstall|start|stop|restart} @@ -47,12 +46,6 @@ @%erts_bin%\erlsrv.exe stop %service_name% @goto :EOF -@rem this relies on a system install of Erlang to be on the PATH. -@rem also, node-naming issues make this difficult to automate -@rem :attach -@rem @werl.exe -remsh %node_name%@localhost -setcookie %COOKIE% -sname console -@rem @goto quit - :set_trim @set %1=%2 @goto :EOF diff --git a/priv/templates/simplenode.windows.start_erl.cmd b/priv/templates/simplenode.windows.start_erl.cmd index 28a0da8..b26e98a 100644 --- a/priv/templates/simplenode.windows.start_erl.cmd +++ b/priv/templates/simplenode.windows.start_erl.cmd @@ -1,6 +1,7 @@ -@rem Do not use "echo off" to not affect any child calls. @setlocal +@rem Parse arguments. erlsrv.exe prepends erl arguments prior to first ++. +@rem Other args are position dependent. @set args="%*" @for /F "delims=++ tokens=1,2,3" %%I in (%args%) do @( @call :set_trim erl_args %%I |