Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-util/ccache/files: ccache-config
Date: Sat, 01 Nov 2014 07:54:38
Message-Id: 20141101075434.13494931E@oystercatcher.gentoo.org
1 vapier 14/11/01 07:54:34
2
3 Modified: ccache-config
4 Log:
5 Trim empty ccache dirs automatically #517242 by Arfrever Frehtes Taifersar Arahesis.
6
7 (Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
8
9 Revision Changes Path
10 1.5 dev-util/ccache/files/ccache-config
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/ccache/files/ccache-config?rev=1.5&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/ccache/files/ccache-config?rev=1.5&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/ccache/files/ccache-config?r1=1.4&r2=1.5
15
16 Index: ccache-config
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-util/ccache/files/ccache-config,v
19 retrieving revision 1.4
20 retrieving revision 1.5
21 diff -u -r1.4 -r1.5
22 --- ccache-config 21 Nov 2010 20:33:31 -0000 1.4
23 +++ ccache-config 1 Nov 2014 07:54:34 -0000 1.5
24 @@ -2,7 +2,7 @@
25 #
26 # ccache-config - helper script for ccache and its ebuild
27 #
28 -# Copyright 2003-2010 Superlucidity Services, LLC
29 +# Copyright 2003-2014 Superlucidity Services, LLC
30 # This program licensed under the GNU GPL version 2.
31 #
32 # This script developed by Zachary T Welch at Superlucidity Services, LLC
33 @@ -45,6 +45,13 @@
34 c_ebegin "Removing ${t}"
35 rm -f "${t}"
36 c_eend
37 +
38 + # Trim the empty dir if possible. #517242
39 + t=${t%/*}
40 + if rmdir "${t}" 2>/dev/null; then
41 + rmdir "${t%/*}" 2>/dev/null
42 + fi
43 + :
44 fi
45 }
46 cc_install_link() {
47 @@ -73,7 +80,7 @@
48 [ "${a}" = "cc" ] && continue
49 a="${2}-${a}"
50 fi
51 - eval "cc_${1}_link" "${a}"
52 + "cc_${1}_link" "${a}"
53 done
54 }