aboutsummaryrefslogtreecommitdiffstats
path: root/priv
diff options
context:
space:
mode:
authorFred Hebert <[email protected]>2017-07-05 13:29:13 -0400
committerFred Hebert <[email protected]>2017-07-05 13:29:13 -0400
commit567eeaab1f5dd7b3792cd8390633353dd7088fbf (patch)
tree639cec52adb1df0a3b5d110e284d610ba044c1b1 /priv
parent1215715be5ce12dd63fe3f538d3ea1d7e15f1f28 (diff)
downloadrelx-567eeaab1f5dd7b3792cd8390633353dd7088fbf.tar.gz
relx-567eeaab1f5dd7b3792cd8390633353dd7088fbf.tar.bz2
relx-567eeaab1f5dd7b3792cd8390633353dd7088fbf.zip
Fixing windows paths for bin scripts
The syntax for proper path handling when the path may contain parentheses (such as C:\Program Files (x86)\...) requires quoting the entire assignment expression: set "var=%val%" any other way of doing it may interpret the parentheses and cause failures.
Diffstat (limited to 'priv')
-rw-r--r--priv/templates/bin_windows16
-rw-r--r--priv/templates/extended_bin_windows18
2 files changed, 17 insertions, 17 deletions
diff --git a/priv/templates/bin_windows b/priv/templates/bin_windows
index b9eb9e2..e66049e 100644
--- a/priv/templates/bin_windows
+++ b/priv/templates/bin_windows
@@ -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
@@ -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 (
@@ -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%"
)
@@ -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
diff --git a/priv/templates/extended_bin_windows b/priv/templates/extended_bin_windows
index ae3404c..139edaa 100644
--- a/priv/templates/extended_bin_windows
+++ b/priv/templates/extended_bin_windows
@@ -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
@@ -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 (
@@ -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
@@ -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%"
)
@@ -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