prefix/winnt/profile.bashrc: first, check if usr/lib does exist
authorMichael Haubenwallner <haubi@gentoo.org>
Mon, 24 Jun 2019 12:12:59 +0000 (14:12 +0200)
committerMichael Haubenwallner <haubi@gentoo.org>
Mon, 24 Jun 2019 12:14:55 +0000 (14:14 +0200)
And fail if creating the back hardlink does fail.

Signed-off-by: Michael Haubenwallner <haubi@gentoo.org>
profiles/prefix/windows/winnt/profile.bashrc

index c0eaec08a6dff23b2fa3b591f5bcd1c4b8c63d14..b8def6390deb7bd4b66ac990ff89c38d2509e8a9 100644 (file)
@@ -62,6 +62,7 @@ post_src_install() {
                        ;;
                esac
        done
+       [[ -d usr/$(get_libdir) ]] &&
        find usr/$(get_libdir) -maxdepth 1 -type f -name '*.dll' |
        while read f
        do
@@ -69,7 +70,7 @@ post_src_install() {
                        ebegin "moving ${f} to usr/bin for native loader"
                        dodir usr/bin || die
                        mv -f "${f}" usr/bin || die
-                       ln -sf "../bin/${f##*/}" "${f}"
+                       ln -sf "../bin/${f##*/}" "${f}" || die
                        eend $?
                fi
        done