vapier 14/11/01 07:54:34 Modified: ccache-config Log: Trim empty ccache dirs automatically #517242 by Arfrever Frehtes Taifersar Arahesis. (Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
Revision Changes Path 1.5 dev-util/ccache/files/ccache-config file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/ccache/files/ccache-config?rev=1.5&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/ccache/files/ccache-config?rev=1.5&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/ccache/files/ccache-config?r1=1.4&r2=1.5 Index: ccache-config =================================================================== RCS file: /var/cvsroot/gentoo-x86/dev-util/ccache/files/ccache-config,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ccache-config 21 Nov 2010 20:33:31 -0000 1.4 +++ ccache-config 1 Nov 2014 07:54:34 -0000 1.5 @@ -2,7 +2,7 @@ # # ccache-config - helper script for ccache and its ebuild # -# Copyright 2003-2010 Superlucidity Services, LLC +# Copyright 2003-2014 Superlucidity Services, LLC # This program licensed under the GNU GPL version 2. # # This script developed by Zachary T Welch at Superlucidity Services, LLC @@ -45,6 +45,13 @@ c_ebegin "Removing ${t}" rm -f "${t}" c_eend + + # Trim the empty dir if possible. #517242 + t=${t%/*} + if rmdir "${t}" 2>/dev/null; then + rmdir "${t%/*}" 2>/dev/null + fi + : fi } cc_install_link() { @@ -73,7 +80,7 @@ [ "${a}" = "cc" ] && continue a="${2}-${a}" fi - eval "cc_${1}_link" "${a}" + "cc_${1}_link" "${a}" done }
