Skip to content

Commit

Permalink
fix: moved ram replacement string
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoryIvo committed Nov 2, 2023
1 parent 2abe9c3 commit 5388800
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ if [ ${BOARD} = "generic-device" ]; then
RAM_KB=$(grep MemTotal /proc/meminfo | awk '{print $2}')
RAM_MB=$(expr $RAM_KB / 1024)
RAM_MB_FOR_KURA=$(expr $RAM_MB / 4)
RAM_REPLACEMENT_STRING="-Xms${RAM_MB_FOR_KURA}m -Xmx${RAM_MB_FOR_KURA}m"

if [ "$RAM_MB" -lt 1024 ]; then
RAM_REPLACEMENT_STRING="-Xms256m -Xmx256m"
Expand All @@ -75,6 +74,7 @@ if [ ${BOARD} = "generic-device" ]; then
echo "Setting kura RAM to ${RAM_REPLACEMENT_STRING}"
start_scripts_to_change=("start_kura.sh" "start_kura_debug.sh" "start_kura_background.sh")

RAM_REPLACEMENT_STRING="-Xms${RAM_MB_FOR_KURA}m -Xmx${RAM_MB_FOR_KURA}m"
for installer_name in "${start_scripts_to_change[@]}"; do
echo "Updating RAM values for $installer_name"
sed -i "s/-Xms[0-9]*m -Xmx[0-9]*m/$RAM_REPLACEMENT_STRING/g" "/opt/eclipse/kura/bin/$installer_name"
Expand Down

0 comments on commit 5388800

Please sign in to comment.