From b9a24a3b7bacdc1f653b5de8b696e0892fa8f5c5 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Wed, 28 Aug 2024 13:54:18 +0100 Subject: [PATCH] JAL-3631 Allow use of ~/ for unixBinDir specified in response.varfile --- utils/install4j/install4j10_template.install4j | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/utils/install4j/install4j10_template.install4j b/utils/install4j/install4j10_template.install4j index c5d1460..9531fc6 100644 --- a/utils/install4j/install4j10_template.install4j +++ b/utils/install4j/install4j10_template.install4j @@ -719,8 +719,18 @@ return null; unixBinDir - context.getBooleanVariable("makeSymbolicLink") -&& (context.getVariable("unixBinDir") == null || context.getVariable("unixBinDir").toString().length() == 0) + if (!context.getBooleanVariable("makeSymbolicLink")) { + return false; +} +String unixBinDir = (String) context.getVariable("unixBinDir"); +if (unixBinDir != null && unixBinDir.length() > 0) { + if (unixBinDir.startsWith("~/")) { + unixBinDir = (String)context.getVariable("sys.userHome") + unixBinDir.substring(1); + context.setVariable("unixBinDir", unixBinDir); + } + return false; +} +return true; -- 1.7.10.2