[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.
This commit is contained in:
Roman Shevchenko
2018-03-09 12:00:02 +01:00
parent a2cac15bf5
commit 32088927eb
@@ -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