oyarzun commented on code in PR #115:
URL:
https://github.com/apache/netbeans-nbpackage/pull/115#discussion_r2387837497
##########
src/main/java/org/apache/netbeans/nbpackage/StringUtils.java:
##########
@@ -30,11 +30,31 @@
public class StringUtils {
private static final Pattern TOKEN_PATTERN =
Pattern.compile("\\$\\{(.+?)\\}");
+ private static final Pattern SCRIPT_VAR_PATTERN =
Pattern.compile("\\$\\{\\{(.+?)\\}\\}");
private StringUtils() {
// static utilities
}
+ /**
+ * Unescapes the bash variables in the script template
+ *
+ * @param template script template
+ * @return script with unescaped variables
+ */
+ public static String unescapeScriptVars(String script)
Review Comment:
This is still needed to avoid replacing bash variables that are used when
the end user is using the installer script to install the software. Since the
user is allowed to choose where to install the software some variables need to
be interpreted as bash variables at runtime. e.g.
`LAUNCHER=${{INSTALL_PATH}}/launcher/${APP_DIR}` gets replaced with
`LAUNCHER=${INSTALL_PATH}/launcher/app_dir` in the installer script.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists