From 2738468ddef169b81f780fffdb86e88e684ad18c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Wed, 20 Apr 2011 15:18:49 +0300 Subject: [PATCH] Replace actual sysconfdir in bash_completion on install (Alioth: #313081). --- CHANGES | 1 + Makefile.am | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGES b/CHANGES index 3c216ed6..e69ec173 100644 --- a/CHANGES +++ b/CHANGES @@ -16,6 +16,7 @@ bash-completion (2.x) * Fix local variable leaks from various completions. * Add _init_completion() for common completion initialization and generic redirection handling, use it in many completions. + * Replace actual sysconfdir in bash_completion on install (Alioth: #313081). [ Guillaume Rousse ] * added puppet completion, using work from Mathieu Parent (sathieudebian.org) diff --git a/Makefile.am b/Makefile.am index dcecc32c..6550a83d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,3 +11,9 @@ bash_completion.sh: bash_completion.sh.in Makefile CLEANFILES = bash_completion.sh EXTRA_DIST = CHANGES $(sysconf_DATA) bash_completion.sh.in + +install-data-hook: + tmpfile=`mktemp $${TMPDIR:-/tmp}/bash_completion.XXXXXX` && \ + sed -e 's|=/etc/bash_completion|=$(sysconfdir)/bash_completion|' \ + $(DESTDIR)$(sysconfdir)/bash_completion > $$tmpfile && \ + mv $$tmpfile $(DESTDIR)$(sysconfdir)/bash_completion