From: Robert Schwebel <r.schwebel@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Robert Schwebel <r.schwebel@pengutronix.de>
Subject: [ptxdist] [PATCH] [RfC] ptxdist: add rootstat command
Date: Wed, 11 Feb 2015 17:34:50 +0100 [thread overview]
Message-ID: <1423672490-5598-1-git-send-email-r.schwebel@pengutronix.de> (raw)
Since we have our debug root components in .debug directories, it became
complicated to find out about the size of the root directory. Add an
option for it.
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
---
bin/ptxdist | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/bin/ptxdist b/bin/ptxdist
index 854648a..34605c2 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -994,6 +994,7 @@ Misc:
newpackage <type> create a new package Makefile in a rules dir
use 'newpackage help' for a longer description
nfsroot run a userspace NFS server and export the nfsroot
+ rootstat print statistics about root directory
print <var> print the contents of a variable, in the way
it is known by "make"
list-packages print a list of all selected packages
@@ -1959,6 +1960,16 @@ EOF
ptxd_make_log ptxd_make_nfsd
exit
;;
+ rootstat)
+ if [ "${PTXDIST_VERBOSE}" == "1" ]; then
+ echo "verbose"
+ exit
+ fi
+ find ${ROOTDIR} -type f \
+ -and \! -path "*/.debug/*" -exec ls --block-size=1 -s {} \; \
+ | awk '{sum += $1} END {print sum/(1024*1024) " MB"}'
+ exit
+ ;;
print)
if [ ${#} -eq 0 ]; then
exit 1
--
2.1.4
--
ptxdist mailing list
ptxdist@pengutronix.de
next reply other threads:[~2015-02-11 16:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-11 16:34 Robert Schwebel [this message]
2015-02-11 16:42 ` Uwe Kleine-König
2015-02-16 10:49 ` Michael Olbrich
2015-02-16 11:41 ` Robert Schwebel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1423672490-5598-1-git-send-email-r.schwebel@pengutronix.de \
--to=r.schwebel@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox