index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dave Reisner <dreisner@archlinux.org> | 2018-07-07 10:29:48 -0400 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2018-11-02 03:16:34 -0400 |
commit | 51db84750ece4de58923d4ce43cb0638ef150f5f (patch) | |
tree | 6aec4d1ed84ca324d61359f2d8408ff078f3bb28 /build-aux/meson-make-symlink.sh | |
parent | dab45f0808951afc2e3146211a1c6d7ebb8bd06d (diff) |
-rw-r--r-- | build-aux/meson-make-symlink.sh | 12 |
diff --git a/build-aux/meson-make-symlink.sh b/build-aux/meson-make-symlink.sh new file mode 100644 index 00000000..501cd43d --- /dev/null +++ b/build-aux/meson-make-symlink.sh @@ -0,0 +1,12 @@ +#!/bin/sh +set -eu + +# this is needed mostly because $DESTDIR is provided as a variable, +# and we need to create the target directory... + +mkdir -vp "$(dirname "${DESTDIR:-}$2")" +if [ "$(dirname $1)" = . ]; then + ln -vfs -T "$1" "${DESTDIR:-}$2" +else + ln -vfs -T --relative "${DESTDIR:-}$1" "${DESTDIR:-}$2" +fi |