From 9347f35bc28fc7857fc520bedf0cf36d8e34c2e6 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 8 Apr 2018 08:41:53 -0700 Subject: configure: lndir tweaks. * configure (lndir): Strip trailing slash from todir argument to prevent double slashes. Remove the destination in case it is a symlink to a directory. --- configure | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure b/configure index f05f2969..82f7ead6 100755 --- a/configure +++ b/configure @@ -590,7 +590,7 @@ printf "Checking source directory \"%s\" ..." "$top_srcdir" lndir() { fromdir=$1 - todir=$2 + todir=${2%/} abs=${fromdir%${fromdir#/}} find "$fromdir" \( -type f -o -type d \) | while read frompath ; do @@ -610,6 +610,7 @@ lndir() [ $1 = "." ] || dots="$dots../" shift done + rm -f "$todir/$topath" ln -sf "$dots$frompath" "$todir/$topath" fi else -- cgit v1.2.3