aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Taylor <[email protected]>2016-04-15 15:54:10 +1000
committerTino Breddin <[email protected]>2019-02-08 10:00:24 +0100
commit7fa443af83c26663ad569dda99a0ce4925e17477 (patch)
treee58e7f04d63165f626142d47b808ea96baacd9c4
parent8d947fcadb3770f51c4aae73bc4a55ea979bc640 (diff)
downloadrelx-7fa443af83c26663ad569dda99a0ce4925e17477.tar.gz
relx-7fa443af83c26663ad569dda99a0ce4925e17477.tar.bz2
relx-7fa443af83c26663ad569dda99a0ce4925e17477.zip
Fix renaming of .orig configuration files on Windows
Fix .orig rename commands in bin_windows 1. .orig was being prepended second argument rather than appended to the first argument 2. Windows' ren command expects the second argument to be just a file name (not contain drive or path components) 3. Tidy up appending of .orig, place inside double quotes rather than outside of quotes. This matches the usage a few lines later: @if exist "%rel_dir%\%rel_name%.boot" ( Copy rename commands from bin_windows to extended_bin_windows.
-rw-r--r--priv/templates/bin_windows17
-rw-r--r--priv/templates/extended_bin_windows7
2 files changed, 24 insertions, 0 deletions
diff --git a/priv/templates/bin_windows b/priv/templates/bin_windows
index b3ce796..19c0d2d 100644
--- a/priv/templates/bin_windows
+++ b/priv/templates/bin_windows
@@ -73,6 +73,23 @@ cd %rootdir%
@set "possible_sys=%rel_dir%\sys.config"
@if exist "%possible_sys%" (
set sys_config=-config "%possible_sys%"
+) else (
+ @if exist "%possible_sys%.orig" (
+ ren "%possible_sys%.orig" sys.config
+ set sys_config=-config "%possible_sys%"
+ )
+)
+
+:: Find the vm.args file
+:find_vm_args
+@set "possible_vm_args=%rel_dir%\vm.args"
+@if exist "%possible_vm_args%" (
+ set vm_args="%possible_vm_args%"
+) else (
+ @if exist "%possible_vm_args%.orig" (
+ ren "%possible_vm_args%.orig" vm.args
+ set vm_args="%possible_vm_args%"
+ )
)
@goto :eof
diff --git a/priv/templates/extended_bin_windows b/priv/templates/extended_bin_windows
index 045a80c..694c5c7 100644
--- a/priv/templates/extended_bin_windows
+++ b/priv/templates/extended_bin_windows
@@ -151,6 +151,13 @@
@if exist %possible_sys% (
set sys_config=-config "%possible_sys%"
)
+@if exist "%possible_sys%.orig" (
+ ren "%possible_sys%.orig" sys.config
+ set sys_config=-config "%possible_sys%"
+)
+@if exist "%rel_dir%\vm.args.orig" (
+ ren "%rel_dir%\vm.args.orig" vm.args
+)
@goto :eof
:: set boot_script variable