[Surfraw-commits] [surfraw] 02/03: ng0's patch to include bash completions
jason ryan
jasonwryan-guest at moszumanska.debian.org
Fri Jan 5 04:16:35 UTC 2018
This is an automated email from the git hooks/post-receive script.
jasonwryan-guest pushed a commit to branch 2.3_rc
in repository surfraw.
commit ad8e7d2547b2263992afff2f14eef45bac0afe9c
Author: Jason Ryan <jasonwryan at gmail.com>
Date: Fri Jan 5 17:10:38 2018 +1300
ng0's patch to include bash completions
---
Makefile.am | 16 +++++++++++++---
configure.in | 7 +++++++
2 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index e0a3e22..ffd469a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,7 +5,11 @@ if OPENSEARCH
dist_bin_SCRIPTS = opensearch-discover opensearch-genquery
endif
devel_extra = banner prebuild
-noinst_DATA = surfraw-bash-completion surfraw.bookmarks
+if BASHCOMPLETIONS
+noinst_DATA = surfraw.bookmarks
+else
+noinst_DATA = surfraw.bookmarks surfraw-bash-completion
+endif
man_MANS = surfraw-update-path.1 surfraw.1 elvi.1sr
if OPENSEARCH
man_MANS += opensearch-discover.1 opensearch-genquery.1
@@ -90,7 +94,7 @@ opensearch-genquery.1: opensearch-genquery
-rm -f $@
pod2man $? > $@
-install-data-hook: links
+install-data-hook: links surfraw-bash-completion
chmod -x surfraw.conf elvi.1sr surfraw.1
mkdir -p $(DESTDIR)@sysconfdir@/xdg/surfraw
cp surfraw.conf $(DESTDIR)@sysconfdir@/xdg/surfraw/conf
@@ -103,6 +107,10 @@ if INSTALLSR
ln -sf surfraw $(DESTDIR)/@bindir@/sr
ln -sf surfraw.1.gz $(DESTDIR)/@mandir@/man1/sr.1.gz
endif
+if BASHCOMPLETIONS
+ mkdir -p $(DESTDIR)@sysconfdir@/bash_completion.d
+ @cp $(top_srcdir)/surfraw-bash-completion $(DESTDIR)@sysconfdir@/bash_completion.d/surfraw
+endif
uninstall-local: links
-rm -f $(DESTDIR)@sysconfdir@/xdg/surfraw/conf
@@ -117,7 +125,9 @@ if INSTALLSR
rm -f $(DESTDIR)/@bindir@/sr
rm -f $(DESTDIR)/@mandir@/man1/sr.1.gz
endif
-
+if BASHCOMPLETIONS
+ -rm -f $(DESTDIR)@sysconfdir@/bash_completion.d/surfraw
+endif
submit-lsm: surfraw.lsm
mail -s add LSM at qqx.org < $?
diff --git a/configure.in b/configure.in
index 5101510..d457430 100644
--- a/configure.in
+++ b/configure.in
@@ -18,6 +18,13 @@ AC_ARG_ENABLE([opensearch],
AC_MSG_RESULT([$enable_opensearch])
AM_CONDITIONAL(OPENSEARCH, test "$enable_opensearch" = "yes")
+AC_MSG_CHECKING([wether to install Bash completions])
+AC_ARG_ENABLE([bash-completions],
+ [AS_HELP_STRING([--disable-bash-completions], [disable Bash completions support])],,
+ [enable_bashcompletions=yes])
+AC_MSG_RESULT([$enable_bashcompletions])
+AM_CONDITIONAL(BASHCOMPLETIONS, test "$enable_bashcompletions" = "yes")
+
AC_MSG_CHECKING([whether to install sr alias])
AC_ARG_ENABLE([sr],
[AS_HELP_STRING([--disable-sr], [disable sr alias])],,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/surfraw/surfraw.git
More information about the Surfraw-commits
mailing list