[tracker/tracker-1.4] Move bash-completion to new location
- From: Michael Biebl <mbiebl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-1.4] Move bash-completion to new location
- Date: Sat, 23 May 2015 15:33:24 +0000 (UTC)
commit 8ca4b8e2cb26567b693d3f4cb16191903f5b6f5a
Author: Michael Biebl <biebl debian org>
Date: Wed May 13 19:17:07 2015 +0200
Move bash-completion to new location
Rename the bash completion script after the binary and move it to
/usr/share/bash-completion/completions. This way the completions can be
loaded on demand.
configure.ac | 13 +++++++++++++
src/tracker/Makefile.am | 6 +++---
.../{tracker-prompt.sh => bash-completion/tracker} | 0
3 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 17a70da..b2e3ae8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -848,6 +848,19 @@ AM_CONDITIONAL(HAVE_BUILTIN_FTS, test "$have_builtin_fts4" = "yes")
AM_CONDITIONAL(HAVE_TRACKER_FTS, test "$have_tracker_fts" = "yes")
####################################################################
+# bash-completion
+####################################################################
+AC_ARG_WITH([bashcompletiondir],
+ AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]),
+ [],
+ [AS_IF([$($PKG_CONFIG --exists bash-completion)], [
+ with_bashcompletiondir=$($PKG_CONFIG --variable=completionsdir bash-completion)
+ ] , [
+ with_bashcompletiondir=${datadir}/bash-completion/completions
+ ])])
+AC_SUBST([bashcompletiondir], [$with_bashcompletiondir])
+
+####################################################################
# Check for D-Bus requirements
####################################################################
diff --git a/src/tracker/Makefile.am b/src/tracker/Makefile.am
index 5815a7c..27e6e96 100644
--- a/src/tracker/Makefile.am
+++ b/src/tracker/Makefile.am
@@ -76,11 +76,11 @@ uninstall-hook:
$(RM) "$(DESTDIR)$(bindir)/tracker-tag"
# Bash completion
-completiondir = $(sysconfdir)/bash_completion.d
-completion_DATA = tracker-prompt.sh
+bashcompletiondir = @bashcompletiondir@
+bashcompletion_DATA = bash-completion/tracker
tracker-compat: tracker-compat.in
$(AM_V_at)sed -e "s|@bindir[ ]|${bindir}|" $< > $@
-EXTRA_DIST = $(completion_DATA) tracker-compat.in
+EXTRA_DIST = $(bashcompletion_DATA) tracker-compat.in
CLEANFILES = tracker-compat
diff --git a/src/tracker/tracker-prompt.sh b/src/tracker/bash-completion/tracker
similarity index 100%
rename from src/tracker/tracker-prompt.sh
rename to src/tracker/bash-completion/tracker
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]