From: Mark Wooding Date: Sat, 14 May 2016 18:14:25 +0000 (+0100) Subject: mklinks.in: Don't make directories if the link name doesn't contain `/'. X-Git-Tag: 1.3.12~3 X-Git-Url: https://git.distorted.org.uk/~mdw/cfd/commitdiff_plain/16d3444d3deaf22f604e6d3f28268839f39907b2 mklinks.in: Don't make directories if the link name doesn't contain `/'. This breakage was introduced in de8440ce...; the previous version carefully stuck `./' on the front of names before trimming off a final `/*'. --- diff --git a/mklinks.in b/mklinks.in index 3435879..3548946 100755 --- a/mklinks.in +++ b/mklinks.in @@ -76,9 +76,8 @@ cat "$@" | while read name; do *=*) want=${name##*=}; name=${name%=*} ;; *) want=${name##*/} ;; esac - dir=${name%/*} if [ -r "$pkgdatadir/$want" ]; then - mkdir -p "$dir" + case "$name" in */*) mkdir -p "${name%/*}" ;; esac rm -f "$name" ln -sf "$pkgdatadir/$want" "$name" fi