Create rules to add/remove symlinks for bash completion.

By default, there is no out-of-the-box bash completion for lxc tools.
This is due to dynamic loading of completions, that requires the
completion filename to be the same as the command (e.g. `lxc-start`
expects a completion filename `lxc-start`). But all commands are in file
`lxc`, which is not read.

Signed-off-by: Edenis Freindorfer Azevedo <edenisfa@gmail.com>
This commit is contained in:
Edênis Freindorfer Azevedo 2021-06-28 14:25:25 -03:00
parent f8fae86f13
commit 7d55228595
No known key found for this signature in database
GPG Key ID: F7F1907D677FB8C9

View File

@ -1982,11 +1982,24 @@ install-exec-local: install-libLTLIBRARIES
if ENABLE_COMMANDS
install-exec-hook:
chmod u+s $(DESTDIR)$(libexecdir)/lxc/lxc-user-nic
if ENABLE_BASH
install-data-local:
cd $(DESTDIR)$(bashcompdir); \
for bin in $(bin_PROGRAMS) ; do \
ln -sf lxc $$bin ; \
done
endif
endif
uninstall-local:
$(RM) $(DESTDIR)$(libdir)/liblxc.so*
$(RM) $(DESTDIR)$(libdir)/liblxc.a
if ENABLE_BASH
for bin in $(bin_PROGRAMS) ; do \
$(RM) $(DESTDIR)$(bashcompdir)/$$bin ; \
done
endif
if ENABLE_PAM
if HAVE_PAM
$(RM) $(DESTDIR)$(pamdir)/pam_cgfs.so*