Merge pull request #2253 from bitwalker/win-iex-help

Print help when --help, -h, or /h are given on windows
This commit is contained in:
José Valim
2014-05-09 04:10:41 +09:00
2 changed files with 16 additions and 10 deletions
+8 -5
View File
@@ -1,11 +1,14 @@
@echo off
set argc=0
for %%x in (%*) do set /A argc+=1
if %argc%== 0 (
goto documentation
) else (
goto parseopts
for %%A in (%*) do (
if "%%A"=="--help" goto documentation
if "%%A"=="-h" goto documentation
if "%%A"=="/h" goto documentation
set /A argc+=1
)
if %argc%==0 goto documentation
goto parseopts
:documentation
echo Usage: %~nx0 [options] [.exs file] [data]
echo.
+8 -5
View File
@@ -1,11 +1,14 @@
@echo off
set argc=0
for %%x in (%*) do set /A argc+=1
if %argc% == 0 (
goto documentation
) else (
goto run
for %%A in (%*) do (
if "%%A"=="--help" goto documentation
if "%%A"=="-h" goto documentation
if "%%A"=="/h" goto documentation
set /A argc+=1
)
if %argc%==0 goto documentation
goto run
:documentation
echo Usage: %~nx0 [elixir switches] [compiler switches] [.ex files]
echo.