diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-04-10 05:55:50 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-04-24 03:47:27 +0200 |
commit | 7b76fce1a5d2590524f713586d2b38dca5224ef0 (patch) | |
tree | cfd657e1adde9738643a82591db47ee549b2337b /tools | |
parent | meson: create dirs and touch /usr (diff) | |
download | systemd-7b76fce1a5d2590524f713586d2b38dca5224ef0.tar.xz systemd-7b76fce1a5d2590524f713586d2b38dca5224ef0.zip |
meson: create various symlinks
v2:
- remove bashisms
Diffstat (limited to 'tools')
-rw-r--r-- | tools/meson-make-symlink.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/meson-make-symlink.sh b/tools/meson-make-symlink.sh new file mode 100644 index 0000000000..87f198694c --- /dev/null +++ b/tools/meson-make-symlink.sh @@ -0,0 +1,11 @@ +#!/bin/sh -e + +# 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 |