[libvirt] [PATCH 03/16] bash_completion scripts have added a new way to do completions, where you place you scripts in /usr/share/bash_completion/completions rather then /etc/bash_completions.d. We should follow the new standard, and this patch moves our bash_completion script to the proper location with the proper name.
Daniel P. Berrange
berrange at redhat.com
Wed Apr 3 11:21:54 UTC 2013
On Tue, Apr 02, 2013 at 06:11:19PM -0400, Dan Walsh wrote:
GIT commit messages should have one initial line less than 70 characters,
then a blank line, then the body of the commit message. This avoids getting
crazy subject lines like you have here.
> Signed-off-by: Dan Walsh <dwalsh at redhat.com>
> ---
> bin/Makefile.am | 18 +++++++++++++++++-
> 1 file changed, 17 insertions(+), 1 deletion(-)
>
> diff --git a/bin/Makefile.am b/bin/Makefile.am
> index 69af01e..4f98aa4 100644
> --- a/bin/Makefile.am
> +++ b/bin/Makefile.am
> @@ -5,7 +5,7 @@ libexec_PROGRAMS = virt-sandbox-service-util
>
> bin_SCRIPTS = virt-sandbox-service
>
> -virtsandboxcompdir = $(sysconfdir)/bash_completion.d/
> +virtsandboxcompdir = $(datarootdir)/bash-completion/completions/
> virtsandboxcomp_DATA = virt-sandbox-service-bash-completion.sh
>
> crondailydir = $(sysconfdir)/cron.daily
> @@ -82,6 +82,22 @@ virt_sandbox_service_util_LDFLAGS = \
> $(WARN_CFLAGS) \
> $(NULL)
>
> +install-virtsandboxcompDATA:
> + @$(NORMAL_INSTALL)
> + @list='$(virtsandboxcomp_DATA)'; test -n "$(virtsandboxcompdir)" || list=; \
> + if test -n "$$list"; then \
> + echo " $(MKDIR_P) '$(DESTDIR)$(virtsandboxcompdir)'"; \
> + $(MKDIR_P) "$(DESTDIR)$(virtsandboxcompdir)" || exit 1; \
> + fi; \
> + for p in $$list; do \
> + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
> + echo "$$d$$p"; \
> + done | $(am__base_list) | \
> + while read files; do \
> + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(virtsandboxcompdir)'"; \
> + $(INSTALL_DATA) $$files "$(DESTDIR)$(virtsandboxcompdir)"/virt-sandbox-service || exit $$?; \
> + done
This is really overkill - you can do the same thing in install-data-local in
2 lines of code.
> +
> install-data-local:
> $(MKDIR_P) $(DESTDIR)$(sysconfdir)/libvirt-sandbox/services
Kill the virtsandboxcomp_DATA variable earlier and then do
install-data-local:
$(MKDIR_P) $(DESTDIR)$(virtsandboxcompdir)
cp virt-sandbox-service-bash-completion.sh $(DESTDIR)$(virtsandboxcompdir)/virt-sandbox-service
uninstall-local:
rm -f $(DESTDIR)$(virtsandboxcompdir)/virt-sandbox-service
And add
EXTRA_DIST += virt-sandbox-service-bash-completion.sh
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the libvir-list
mailing list