[buildbot] phase1: ccache.sh: also overwrite dangling symlinks

LEDE Commits lede-commits at lists.infradead.org
Tue Jan 24 05:47:47 PST 2017


jow pushed a commit to buildbot.git, branch master:
https://git.lede-project.org/c5ed9101014be9ea899bf660583ad51b600fb2ab

commit c5ed9101014be9ea899bf660583ad51b600fb2ab
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Tue Jan 24 14:47:33 2017 +0100

    phase1: ccache.sh: also overwrite dangling symlinks
    
    Signed-off-by: Jo-Philipp Wich <jo at mein.io>
---
 phase1/ccache.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/phase1/ccache.sh b/phase1/ccache.sh
index 46081f3..057733b 100755
--- a/phase1/ccache.sh
+++ b/phase1/ccache.sh
@@ -11,7 +11,7 @@ grep -sq compiler_check "$HOME/.ccache/ccache.conf" || \
 	echo "compiler_check = %compiler% -dumpmachine; %compiler% -dumpversion" >> "$HOME/.ccache/ccache.conf"
 
 for dir in $(make --no-print-directory val.TOOLCHAIN_DIR val.STAGING_DIR val.STAGING_DIR_HOST V=s | grep staging_dir/); do
-	if [ ! -L "$dir/ccache" ]; then
+	if [ ! -L "$dir/ccache" ] || [ -L "$dir/ccache" -a ! -d "$dir/ccache" ]; then
 		mkdir -vp "$dir"
 		rm -vrf "$dir/ccache"
 		ln -vs "$HOME/.ccache" "$dir/ccache"



More information about the lede-commits mailing list