Skip to content

Commit

Permalink
While we're at it, let's fix that OS X memory detection bug I introduced
Browse files Browse the repository at this point in the history
  • Loading branch information
spaghetti2514 committed Sep 3, 2012
1 parent ee69743 commit 603a0d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion screenfetch-dev
Expand Up @@ -508,7 +508,7 @@ detectmem () {
if [ "$distro" == "Mac OS X" ]; then
totalmem=$(echo "$(sysctl -n hw.memsize)"/${human}^2|bc)
# usedmem=$(echo "$(sysctl -n hw.usermem)"/1024^2|bc)
usedmem=$(echo "$(top -l 1 | awk '/PhysMem/' | grep -o \[0-9]\*M | tail -2 | head -1)B")
usedmem=$(echo "$(top -l 1 | awk '/PhysMem/' | grep -o \[0-9]\*'M used' | grep -o \[0-9]\*)")
elif [ "$distro" == "FreeBSD" ]; then
phys_mem=$(sysctl -n hw.physmem)
size_mem=$phys_mem
Expand Down

0 comments on commit 603a0d3

Please sign in to comment.