Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Modify Java_Home injecting in lines after finding the match,

TRY 1

Code Block
wget http://www.bonsaiframework.com/tscripts/lucidworks-fusion/fusion_java_home.txt
sed '/function check_java() {/r fusion_java_home.txt' /opt/lucidworks/fusion/3.1.2/bin/common.sh > /opt/lucidworks/fusion/3.1.2/bin/common.sh

TRY 2

Code Block
languagebash
sed '/function check_java()/c\
function check_java()\
  \
  # Bonsaiframework - Modification Start\
  # --------------------------------------\
  JRE_HOME="$FUSION_HOME"/java\
  JAVA_HOME="$FUSION_HOME"/java\
  # --------------------------------------\
  # Bonsaiframework - Modification End\
' /opt/lucidworks/fusion/3.1.2/bin/common.sh

You common.sh file will have the following inserted,

...