]> git.ipfire.org Git - thirdparty/systemd.git/blame - tools/meson-make-symlink.sh
Merge pull request #18007 from fw-strlen/ipv6_masq_and_dnat
[thirdparty/systemd.git] / tools / meson-make-symlink.sh
CommitLineData
7629744a 1#!/bin/sh
9ee03516 2# SPDX-License-Identifier: LGPL-2.1-or-later
7629744a 3set -eu
7b76fce1 4
09422f9a
DDM
5if [ "${MESON_INSTALL_QUIET:-0}" = 1 ] ; then
6 VERBOSE=""
7else
8 VERBOSE="v"
9fi
10
7b76fce1
ZJS
11# this is needed mostly because $DESTDIR is provided as a variable,
12# and we need to create the target directory...
13
09422f9a 14mkdir -${VERBOSE}p "$(dirname "${DESTDIR:-}$2")"
c8475239 15if [ "$(dirname $1)" = . -o "$(dirname $1)" = .. ]; then
09422f9a 16 ln -${VERBOSE}fs -T -- "$1" "${DESTDIR:-}$2"
7b76fce1 17else
09422f9a 18 ln -${VERBOSE}fs -T --relative -- "${DESTDIR:-}$1" "${DESTDIR:-}$2"
7b76fce1 19fi