The runuser symlink used to depend on su being enabled, but a refactoring
broke that. So if you build with runuser enabled but not su, you end up
with a broken symlink. Rework the logic so it works in both cases.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
if BUILD_RUNUSER
install-data-hook-bashcomp-runuser::
+if BUILD_SU
ln -sf su $(DESTDIR)$(bashcompletiondir)/runuser
+else
+ cp $(top_srcdir)/bash-completion/su $(DESTDIR)$(bashcompletiondir)/runuser
+endif
INSTALL_DATA_HOOKS += install-data-hook-bashcomp-runuser
endif