From: Ben Soares Date: Wed, 28 Aug 2024 12:54:18 +0000 (+0100) Subject: JAL-3631 Allow use of ~/ for unixBinDir specified in response.varfile X-Git-Tag: Release_2_11_4_0~14^2~8^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=b9a24a3b7bacdc1f653b5de8b696e0892fa8f5c5;p=jalview.git JAL-3631 Allow use of ~/ for unixBinDir specified in response.varfile --- 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;