From 32088927ebe324b132ee6d03ad4831f1bfeeea90 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Fri, 9 Mar 2018 11:59:42 +0100 Subject: [PATCH] [platform] accepts old format of YJP agent specification in Unix startup script The change prevents an IDE from failing if it starts with VM options migrated from an older version. --- .../resources/linux/scripts/executable-template.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/build-scripts/resources/linux/scripts/executable-template.sh b/platform/build-scripts/resources/linux/scripts/executable-template.sh index ddf10e0274d3..286f4f60ed17 100755 --- a/platform/build-scripts/resources/linux/scripts/executable-template.sh +++ b/platform/build-scripts/resources/linux/scripts/executable-template.sh @@ -176,7 +176,7 @@ if [ -r "$VM_OPTIONS_FILE" ]; then VM_OPTIONS=`"$CAT" "$VM_OPTIONS_FILE" | "$GREP" -v "^#.*"` if { echo "$VM_OPTIONS" | "$GREP" -q "agentlib:yjpagent" - ; } then if [ "$OS_TYPE" = "Linux" ]; then - VM_OPTIONS=`echo "$VM_OPTIONS" | "$SED" -e "s|-agentlib:yjpagent\([^=]*\)|-agentpath:$IDE_BIN_HOME/libyjpagent-linux\1.so|"` + VM_OPTIONS=`echo "$VM_OPTIONS" | "$SED" -e "s|-agentlib:yjpagent\(-linux\)\?\([^=]*\)|-agentpath:$IDE_BIN_HOME/libyjpagent-linux\2.so|"` else VM_OPTIONS=`echo "$VM_OPTIONS" | "$SED" -e "s|-agentlib:yjpagent[^ ]\+||"` fi