2017-12-24 07:53:20 +01:00
|
|
|
#!/bin/sh
|
|
|
|
set -eu
|
2017-04-10 05:55:50 +02:00
|
|
|
|
2020-12-06 19:16:59 +01:00
|
|
|
if [ "${MESON_INSTALL_QUIET:-0}" = 1 ] ; then
|
|
|
|
VERBOSE=""
|
|
|
|
else
|
|
|
|
VERBOSE="v"
|
|
|
|
fi
|
|
|
|
|
2017-04-10 05:55:50 +02:00
|
|
|
# this is needed mostly because $DESTDIR is provided as a variable,
|
|
|
|
# and we need to create the target directory...
|
|
|
|
|
2020-12-06 19:16:59 +01:00
|
|
|
mkdir -${VERBOSE}p "$(dirname "${DESTDIR:-}$2")"
|
2019-12-10 16:05:48 +01:00
|
|
|
if [ "$(dirname $1)" = . -o "$(dirname $1)" = .. ]; then
|
2020-12-06 19:16:59 +01:00
|
|
|
ln -${VERBOSE}fs -T -- "$1" "${DESTDIR:-}$2"
|
2017-04-10 05:55:50 +02:00
|
|
|
else
|
2020-12-06 19:16:59 +01:00
|
|
|
ln -${VERBOSE}fs -T --relative -- "${DESTDIR:-}$1" "${DESTDIR:-}$2"
|
2017-04-10 05:55:50 +02:00
|
|
|
fi
|