On Fri, Aug 03, at 12:47 Dan Nicholson wrote:
>
> I've been confused by this at various times in the past, but here's
> approximately how I compute things now (and I haven't been scolded in
> a while :).
>
> $ wget tarball.tar.bz2
> $ du -b tarball.tar.bz2 | awk '{print "size: " $1/1024 " KB"}'
> $ start=$(du -bs . | cut -f1)
> $ tar -xf tarball.tar.bz2
> $ ( cd tarball && do stuff && make DESTDIR=`pwd`/dest install )
> $ end=$(du -bs . | cut -f1)
> $ echo $end $start | awk '{print "build size: " ($1 - $2)/1024 " KB"}'
>
> Converting to MB as necessary.
>
Oh well, here is mine.
let s:diskspacebefore = substitute(system("sudo du -skx / --exclude=/tools
--exclude=/mnt
\ --exclude=/home --exclude=/root --exclude=/tmp".s:builddir.
\ "|awk '{t += $1}END{print t}'"), '^\(.*\)\n', '\1', '')
let s:diskspaceafter = substitute(system("sudo du -skx / --exclude=/tools
--exclude=/mnt
\ --exclude=/home --exclude=/root --exclude=/tmp".s:builddir.
\"|awk '{t += $1}END{print t}'"), '^\(.*\)\n', '\1', '')
let s:totaldiskspace = substitute(system("perl -e 'printf \"\%.3f\\n\",
('".s:diskspaceafter
\."' - '".s:diskspacebefore."') / 1024 ';"), '^\(.*\)\n', '\1',
'')
--
http://wiki.linuxfromscratch.org/blfs/wiki/Hacking
--
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page