Gentoo Archives: gentoo-commits

From: Christoph Mende <angelos@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/qa-scripts:master commit in: /
Date: Fri, 06 May 2011 18:22:38
Message-Id: 0500eaa203e255a71cb55e6332bf8d6e6eb3a166.angelos@gentoo
1 commit: 0500eaa203e255a71cb55e6332bf8d6e6eb3a166
2 Author: Christoph Mende <angelos <AT> unkreativ <DOT> org>
3 AuthorDate: Fri May 6 18:22:15 2011 +0000
4 Commit: Christoph Mende <angelos <AT> gentoo <DOT> org>
5 CommitDate: Fri May 6 18:22:15 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=0500eaa2
7
8 Minor improvements to filesdur-usage.sh
9 Use pushd/popd instead of cd.
10 Don't rely on portdir being in /usr/portage
11
12 ---
13 filesdir-usage.sh | 3 ++-
14 1 files changed, 2 insertions(+), 1 deletions(-)
15
16 diff --git a/filesdir-usage.sh b/filesdir-usage.sh
17 index 4677277..920b5af 100755
18 --- a/filesdir-usage.sh
19 +++ b/filesdir-usage.sh
20 @@ -3,11 +3,12 @@
21 # $1 is a number, N. The top N directories that are consuming space. Defaults to
22 # all.
23
24 -cd /usr/portage/
25 +pushd $(portageq portdir) >/dev/null
26 if [[ -z $1 ]]; then
27 du -h */*/files | sort -nr
28 else
29 du -h */*/files | sort -nr | head -n $1
30 fi
31 +popd >/dev/null
32 echo
33 echo $(emerge --info | grep Timestamp)