]> git.ipfire.org Git - thirdparty/systemd.git/blame - tools/meson-make-symlink.sh
Merge pull request #15167 from ssahani/address-gen-mode
[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")"
c8475239
ZJS
8if [ "$(dirname $1)" = . -o "$(dirname $1)" = .. ]; then
9 ln -vfs -T -- "$1" "${DESTDIR:-}$2"
7b76fce1 10else
c8475239 11 ln -vfs -T --relative -- "${DESTDIR:-}$1" "${DESTDIR:-}$2"
7b76fce1 12fi