From ee477fb31ad9a7603aaea8922aaa9ecd3712ee2d Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Tue, 12 Jun 2018 19:07:22 -0600 Subject: support for OTP21's sys.config.src file in releases (#647) * support for OTP21's sys.config.src file in releases * always replace os vars in .src files if found * support vm_args_src to be consistent with sys_config_src * add newlines after warning logs * improve sys and vm src config tests --- priv/templates/extended_bin | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'priv') diff --git a/priv/templates/extended_bin b/priv/templates/extended_bin index dc01d5f..d044a38 100755 --- a/priv/templates/extended_bin +++ b/priv/templates/extended_bin @@ -263,8 +263,11 @@ add_path() { check_replace_os_vars() { IN_FILE_PATH=$(add_path $1 $2) OUT_FILE_PATH="$IN_FILE_PATH" + SRC_FILE_PATH="$IN_FILE_PATH.src" ORIG_FILE_PATH="$IN_FILE_PATH.orig" - if [ $RELX_REPLACE_OS_VARS ]; then + if [ -f "$SRC_FILE_PATH" ]; then + replace_os_vars "$SRC_FILE_PATH" "$OUT_FILE_PATH" + elif [ $RELX_REPLACE_OS_VARS ]; then # Create a new file in the same location as original OUT_FILE_PATH=$(make_out_file_path $IN_FILE_PATH) # If vm.args.orig or sys.config.orig is present then use that -- cgit v1.2.3