Merge pull request #176 from samply/fix/bash-math

fix: Make math work on bash 4.2
This commit is contained in:
patrickskowronekdkfz 2024-04-03 12:59:52 +02:00 committed by GitHub
commit ac3ff314ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -164,7 +164,7 @@ setHostname() {
optimizeBlazeMemoryUsage() { optimizeBlazeMemoryUsage() {
if [ -z "$BLAZE_MEMORY_CAP" ]; then if [ -z "$BLAZE_MEMORY_CAP" ]; then
system_memory_in_mb=$(LC_ALL=C free -m | grep 'Mem:' | awk '{print $2}'); system_memory_in_mb=$(LC_ALL=C free -m | grep 'Mem:' | awk '{print $2}');
export BLAZE_MEMORY_CAP=$(("$system_memory_in_mb"/4)); export BLAZE_MEMORY_CAP=$(($system_memory_in_mb/4));
fi fi
if [ -z "$BLAZE_RESOURCE_CACHE_CAP" ]; then if [ -z "$BLAZE_RESOURCE_CACHE_CAP" ]; then
available_system_memory_chuncks=$((BLAZE_MEMORY_CAP / 1000)) available_system_memory_chuncks=$((BLAZE_MEMORY_CAP / 1000))