summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2020-12-06 19:16:59 +0100
committerDaan De Meyer <daan.j.demeyer@gmail.com>2020-12-06 23:11:11 +0100
commit09422f9a28481eb5c49d375a6b5b7ca2b773c1ae (patch)
treed615cf5a0d0249ee4dfad1f1d18a52e55966c52a
parentmkosi: Silence locale checking in mkosi.build (diff)
downloadsystemd-09422f9a28481eb5c49d375a6b5b7ca2b773c1ae.tar.xz
systemd-09422f9a28481eb5c49d375a6b5b7ca2b773c1ae.zip
meson: Respect MESON_INSTALL_QUIET
MESON_INSTALL_QUIET is set when --quiet is passed to meson install. Make sure we check the variable in our custom install scripts and don't output anything if it is set.
-rwxr-xr-xtools/meson-make-symlink.sh12
-rwxr-xr-xunits/meson-add-wants.sh12
2 files changed, 18 insertions, 6 deletions
diff --git a/tools/meson-make-symlink.sh b/tools/meson-make-symlink.sh
index cdd5214125..8c7e887f51 100755
--- a/tools/meson-make-symlink.sh
+++ b/tools/meson-make-symlink.sh
@@ -1,12 +1,18 @@
#!/bin/sh
set -eu
+if [ "${MESON_INSTALL_QUIET:-0}" = 1 ] ; then
+ VERBOSE=""
+else
+ VERBOSE="v"
+fi
+
# this is needed mostly because $DESTDIR is provided as a variable,
# and we need to create the target directory...
-mkdir -vp "$(dirname "${DESTDIR:-}$2")"
+mkdir -${VERBOSE}p "$(dirname "${DESTDIR:-}$2")"
if [ "$(dirname $1)" = . -o "$(dirname $1)" = .. ]; then
- ln -vfs -T -- "$1" "${DESTDIR:-}$2"
+ ln -${VERBOSE}fs -T -- "$1" "${DESTDIR:-}$2"
else
- ln -vfs -T --relative -- "${DESTDIR:-}$1" "${DESTDIR:-}$2"
+ ln -${VERBOSE}fs -T --relative -- "${DESTDIR:-}$1" "${DESTDIR:-}$2"
fi
diff --git a/units/meson-add-wants.sh b/units/meson-add-wants.sh
index a483d75b86..2241fc26a2 100755
--- a/units/meson-add-wants.sh
+++ b/units/meson-add-wants.sh
@@ -5,6 +5,12 @@ unitdir="$1"
target="$2"
unit="$3"
+if [ "${MESON_INSTALL_QUIET:-0}" = 1 ] ; then
+ VERBOSE=""
+else
+ VERBOSE="v"
+fi
+
case "$target" in
*/?*) # a path, but not just a slash at the end
dir="${DESTDIR:-}${target}"
@@ -18,11 +24,11 @@ unitpath="${DESTDIR:-}${unitdir}/${unit}"
case "$target" in
*/)
- mkdir -vp -m 0755 "$dir"
+ mkdir -${VERBOSE}p -m 0755 "$dir"
;;
*)
- mkdir -vp -m 0755 "$(dirname "$dir")"
+ mkdir -${VERBOSE}p -m 0755 "$(dirname "$dir")"
;;
esac
-ln -vfs --relative "$unitpath" "$dir"
+ln -${VERBOSE}fs --relative "$unitpath" "$dir"