diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 14:51:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 14:51:55 +0000 |
commit | 86b7f1a83d7db9c912f32b29c32e1124c0a6454d (patch) | |
tree | 42a7ff7c6885e99e0669d07b104df11b2bf387b6 /plugins/meson-add-wants.sh | |
parent | Initial commit. (diff) | |
download | gnome-settings-daemon-86b7f1a83d7db9c912f32b29c32e1124c0a6454d.tar.xz gnome-settings-daemon-86b7f1a83d7db9c912f32b29c32e1124c0a6454d.zip |
Adding upstream version 3.38.2.upstream/3.38.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | plugins/meson-add-wants.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/plugins/meson-add-wants.sh b/plugins/meson-add-wants.sh new file mode 100755 index 0000000..c33d1b4 --- /dev/null +++ b/plugins/meson-add-wants.sh @@ -0,0 +1,30 @@ +#!/bin/sh +set -eu + +# Script copied from systemd + +unitdir="$1" +target="$2" +unit="$3" + +case "$target" in + */?*) # a path, but not just a slash at the end + dir="${DESTDIR:-}${target}" + ;; + *) + dir="${DESTDIR:-}${unitdir}/${target}" + ;; +esac + +unitpath="${DESTDIR:-}${unitdir}/${unit}" + +case "$target" in + */) + mkdir -vp -m 0755 "$dir" + ;; + *) + mkdir -vp -m 0755 "$(dirname "$dir")" + ;; +esac + +ln -vfs --relative "$unitpath" "$dir" |