[tracker] Move bash-completion to new location
- From: Michael Biebl <mbiebl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] Move bash-completion to new location
- Date: Sat, 23 May 2015 15:34:04 +0000 (UTC)
commit 05e7c40b32de62a3e063dbbb7311080d9ec14e95
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 7551e03..7d89eaa 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 d487276..ed4a313 100644
--- a/src/tracker/Makefile.am
+++ b/src/tracker/Makefile.am
@@ -76,12 +76,12 @@ 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}|" $< > $@
$(AM_V_at)chmod +x $@
-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]