Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #8949 from EOSIO/replace-bc-with-shell-arithmetic
Browse files Browse the repository at this point in the history
Replace bc with shell arithmetic - 2.0
  • Loading branch information
revl authored Apr 16, 2020
2 parents 2d2acf0 + c791983 commit 089d3f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/helpers/general.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function set_system_vars() {
export OS_MAJ=$(echo "${OS_VER}" | cut -d'.' -f1)
export OS_MIN=$(echo "${OS_VER}" | cut -d'.' -f2)
export OS_PATCH=$(echo "${OS_VER}" | cut -d'.' -f3)
export MEM_GIG=$(bc <<< "($(sysctl -in hw.memsize) / 1024000000)")
export MEM_GIG=$(($(sysctl -in hw.memsize) / 1024 / 1024 /1024))
export DISK_INSTALL=$(df -h . | tail -1 | tr -s ' ' | cut -d\ -f1 || cut -d' ' -f1)
export blksize=$(df . | head -1 | awk '{print $2}' | cut -d- -f1)
export gbfactor=$(( 1073741824 / blksize ))
Expand Down Expand Up @@ -379,4 +379,4 @@ function ensure-apt-packages() {
echo ""
fi
IFS=$OLDIFS
}
}

0 comments on commit 089d3f9

Please sign in to comment.