Skip to content

Commit

Permalink
Merge pull request #597 from ferd/bin_windows-path-escape
Browse files Browse the repository at this point in the history
Fixing windows paths for bin scripts
  • Loading branch information
lrascao authored Jul 5, 2017
2 parents 1215715 + 567eeaa commit 7adfb21
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
16 changes: 8 additions & 8 deletions priv/templates/bin_windows
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
@for %%A in ("%script_dir%\..") do (
set "release_root_dir=%%~fA"
)
@set rel_dir=%release_root_dir%\releases\%rel_vsn%
@set "rel_dir=%release_root_dir%\releases\%rel_vsn%"

@call :find_erts_dir
@call :find_sys_config
@call :set_boot_script_var

@set rootdir=%release_root_dir%
@set bindir=%erts_dir%\bin
@set "rootdir=%release_root_dir%"
@set "bindir=%erts_dir%\bin"
@set progname=erl
@set erl=%bindir%\erl

Expand All @@ -41,7 +41,7 @@ cd %rootdir%

:: Find the ERTS dir
:find_erts_dir
@set erts_dir=%release_root_dir%\erts-%erts_vsn%
@set "erts_dir=%release_root_dir%\erts-%erts_vsn%"
@if exist %erts_dir% (
goto :set_erts_dir_from_default
) else (
Expand All @@ -64,13 +64,13 @@ cd %rootdir%
@for /f "delims=" %%i in ('%%dir_cmd%%') do (
set erl_root=%%i
)
@set erts_dir=%erl_root%\erts-%erts_vsn%
@set "erts_dir=%erl_root%\erts-%erts_vsn%"
@set rootdir=%erl_root%
@goto :eof

:: Find the sys.config file
:find_sys_config
@set possible_sys=%rel_dir%\sys.config
@set "possible_sys=%rel_dir%\sys.config"
@if exist "%possible_sys%" (
set sys_config=-config "%possible_sys%"
)
Expand All @@ -79,8 +79,8 @@ cd %rootdir%
:: set boot_script variable
:set_boot_script_var
@if exist "%rel_dir%\%rel_name%.boot" (
set boot_script=%rel_dir%\%rel_name%
set "boot_script=%rel_dir%\%rel_name%"
) else (
set boot_script=%rel_dir%\start
set "boot_script=%rel_dir%\start"
)
@goto :eof
18 changes: 9 additions & 9 deletions priv/templates/extended_bin_windows
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
@for %%A in ("%script_dir%\..") do @(
set release_root_dir=%%~fA
)
@set rel_dir=%release_root_dir%\releases\%rel_vsn%
@set "rel_dir=%release_root_dir%\releases\%rel_vsn%"

@call :find_erts_dir
@call :find_sys_config
Expand Down Expand Up @@ -79,7 +79,7 @@

:: Find the ERTS dir
:find_erts_dir
@set possible_erts_dir=%release_root_dir%\erts-%erts_vsn%
@set "possible_erts_dir=%release_root_dir%\erts-%erts_vsn%"
@if exist "%possible_erts_dir%" (
call :set_erts_dir_from_default
) else (
Expand All @@ -89,8 +89,8 @@

:: Set the ERTS dir from the passed in erts_vsn
:set_erts_dir_from_default
@set erts_dir=%possible_erts_dir%
@set rootdir=%release_root_dir%
@set "erts_dir=%possible_erts_dir%"
@set "rootdir=%release_root_dir%"
@goto :eof

:: Set the ERTS dir from erl
Expand All @@ -102,13 +102,13 @@
@for /f "delims=" %%i in ('%%dir_cmd%%') do @(
set erl_root=%%i
)
@set erts_dir=%erl_root%\erts-%erts_vsn%
@set rootdir=%erl_root%
@set "erts_dir=%erl_root%\erts-%erts_vsn%"
@set "rootdir=%erl_root%"
@goto :eof

:: Find the sys.config file
:find_sys_config
@set possible_sys=%rel_dir%\sys.config
@set "possible_sys=%rel_dir%\sys.config"
@if exist %possible_sys% (
set sys_config=-config "%possible_sys%"
)
Expand All @@ -117,9 +117,9 @@
:: set boot_script variable
:set_boot_script_var
@if exist "%rel_dir%\%rel_name%.boot" (
set boot_script=%rel_dir%\%rel_name%
set "boot_script=%rel_dir%\%rel_name%"
) else (
set boot_script=%rel_dir%\start
set "boot_script=%rel_dir%\start"
)
@goto :eof

Expand Down

0 comments on commit 7adfb21

Please sign in to comment.