File tree Expand file tree Collapse file tree 3 files changed +16
-11
lines changed Expand file tree Collapse file tree 3 files changed +16
-11
lines changed Original file line number Diff line number Diff line change 1
1
@ echo off
2
- if " %* " == " " (
3
- goto documentation
2
+ set argc = 0
3
+ for %%x in (%* ) do set /A argc += 1
4
+ if %argc% == 0 (
5
+ goto documentation
4
6
) else (
5
- goto run
6
- )
7
+ goto run
8
+ )
7
9
:documentation
8
10
echo Usage: %~nx0 [options] [.exs file] [data]
9
11
echo .
@@ -20,4 +22,4 @@ echo ** Options marked with (*) can be given more than once
20
22
echo ** Options given after the .exs file or -- are passed down to the executed code
21
23
echo ** Options can be passed to the erlang runtime using ELIXIR_ERL_OPTS
22
24
:run
23
- erl -env ERL_LIBS %ERL_LIBS% ;" %~dp0 \..\lib" -noshell %ELIXIR_ERL_OPTS% -s elixir start_cli -extra %*
25
+ erl -env ERL_LIBS %ERL_LIBS% ;" %~dp0 \..\lib" -noshell %ELIXIR_ERL_OPTS% -s elixir start_cli -extra %*
Original file line number Diff line number Diff line change 1
1
@ echo off
2
- if " %* " == " " (
3
- goto documentation
2
+ set argc = 0
3
+ for %%x in (%* ) do set /A argc += 1
4
+ if %argc% == 0 (
5
+ goto documentation
4
6
) else (
5
- goto run
6
- )
7
+ goto run
8
+ )
7
9
:documentation
8
10
echo Usage: %~nx0 [elixir switches] [compiler switches] [.ex files]
9
11
echo .
@@ -16,4 +18,4 @@ echo ** Options marked with (*) can be given more than once
16
18
echo ** Options given after -- are passed down to the executed code
17
19
echo ** Options can be passed to the erlang runtime using ELIXIR_ERL_OPTS" >&2
18
20
:run
19
- call " %~dp0 \elixir.bat" --compile %*
21
+ call " %~dp0 \elixir.bat" --compile %*
Original file line number Diff line number Diff line change 1
- call " %~dp0 \elixir.bat" " %~dp0 \mix" %*
1
+ @ echo off
2
+ call " %~dp0 \elixir.bat" " %~dp0 \mix" %*
You can’t perform that action at this time.
0 commit comments