1 # shellcheck shell=bash
3 # This setup hook, for each output, moves everything in
4 # $output/lib/systemd/user to $output/share/systemd/user, and replaces
5 # $output/lib/systemd/user with a symlink to
6 # $output/share/systemd/user.
8 fixupOutputHooks
+=(_moveSystemdUserUnits
)
10 _moveSystemdUserUnits
() {
11 if [ "${dontMoveSystemdUserUnits:-0}" = 1 ]; then return; fi
12 if [ ! -e "${prefix:?}/lib/systemd/user" ]; then return; fi
13 local source="$prefix/lib/systemd/user"
14 local target
="$prefix/share/systemd/user"
15 echo "moving $source/* to $target"
19 for i
in "$source"/*; do
24 ln -s "$target" "$source"