Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix displaing disk-usage on bash 3.2/osx, fix #1144

  • Loading branch information...
commit 6a03e98c4daa55cdfb1dfa3b72e1006d9fc2b616 1 parent d4ceafb
@mpapis mpapis authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  scripts/disk-usage
View
3  scripts/disk-usage
@@ -21,7 +21,8 @@ disk_usage()
printf "%${length}s" "${name} Usage: "
if [[ -n "$directory" && -d "$directory" && "$directory" != "/" ]]
then
- _pre="$(du -hs "$@" "${directory}/")"
+ # echo needed to clean spaces (different systems displays this differently)
+ _pre="$( echo $( du -hs "$@" "${directory}/" ) )"
echo ${_pre%% *}
else
echo "0B"
Please sign in to comment.
Something went wrong with that request. Please try again.