]> git.ipfire.org Git - thirdparty/systemd.git/blame - tools/meson-make-symlink.sh
logind: when we cannot attach a passed fd to a device, close it
[thirdparty/systemd.git] / tools / meson-make-symlink.sh
CommitLineData
7629744a 1#!/bin/sh
2set -eu
7b76fce1
ZJS
3
4# this is needed mostly because $DESTDIR is provided as a variable,
5# and we need to create the target directory...
6
dc25d2ad 7mkdir -vp "$(dirname "${DESTDIR:-}$2")"
7b76fce1 8if [ "$(dirname $1)" = . ]; then
b884196c 9 ln -vfs -T "$1" "${DESTDIR:-}$2"
7b76fce1 10else
b884196c 11 ln -vfs -T --relative "${DESTDIR:-}$1" "${DESTDIR:-}$2"
7b76fce1 12fi