[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.

Dan Walsh dwalsh at redhat.com
Tue Apr 2 22:11:19 UTC 2013


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
+
 install-data-local:
 		$(MKDIR_P) $(DESTDIR)$(sysconfdir)/libvirt-sandbox/services
 
-- 
1.8.2




More information about the libvir-list mailing list