diff options
| author | Shaun Jackman | 2012-12-11 08:29:14 -0800 |
|---|---|---|
| committer | Charlie Sharpsteen | 2012-12-11 09:32:16 -0800 |
| commit | 9a4567c2f971320fa63cef3b5e31638a0177aae6 (patch) | |
| tree | c964c9216af73983092bad847250933823f19155 /Library/Homebrew | |
| parent | 827e4f813fe0ae2de3ff3179cc1a3d924bd84d2c (diff) | |
| download | brew-9a4567c2f971320fa63cef3b5e31638a0177aae6.tar.bz2 | |
pathname.rb: Pass -s to du instead of -d0
The option `du -s` is equivalent to `du -d0`. The former is a POSIX standard
(IEEE Std 1003.1-2008), whereas the latter is a BSD extension.
From the BSD man page:
`-s Display an entry for each specified file. (Equivalent to -d 0)`
From SUSv4:
`-s Instead of the default output, report only the total sum for each of the specified files.`
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/du.html
Closes Homebrew/homebrew#16516.
Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/extend/pathname.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index d39b21689..ae64df0c1 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -164,7 +164,7 @@ class Pathname out='' n=`find #{to_s} -type f ! -name .DS_Store | wc -l`.to_i out<<"#{n} files, " if n > 1 - out<<`/usr/bin/du -hd0 #{to_s} | cut -d"\t" -f1`.strip + out<<`/usr/bin/du -hs #{to_s} | cut -d"\t" -f1`.strip end def version |
