Commit 84970983 authored by Ondřej Surý's avatar Ondřej Surý Committed by Dominik Taborsky

Move contrib/* to samples/ and install completions for bash and zsh

parent 0d85fd28
......@@ -15,7 +15,7 @@ knot.sample.conf: knot.sample.conf.in
$(edit) $${srcdir}$@.in >$@.tmp
mv $@.tmp $@
EXTRA_DIST = knot.sample.conf.in example.com.zone
EXTRA_DIST = knot.sample.conf.in example.com.zone keymgr-completion.sh keymgr-completion.zsh
if HAVE_DAEMON
......@@ -24,12 +24,28 @@ install-data-local: knot.sample.conf
$(INSTALL) -d $(DESTDIR)/$(config_dir)
[ -f $(DESTDIR)/$(config_dir)/knot.sample.conf ] || \
$(INSTALL_DATA) knot.sample.conf $(srcdir)/example.com.zone $(DESTDIR)/$(config_dir)
[ -d $(DESTDIR)/$(sysconfdir)/bash_completion.d ] ||
$(INSTALL) -d $(DESTDIR)/$(sysconfdir)/bash_completion.d
[ -f $(DESTDIR)/$(sysconfdir)/keymgr-completion.sh ] || \
$(INSTALL_DATA) keymgr-completion.sh $(DESTDIR)/$(sysconfdir)/bash_completion.d/keymgr
[ -d $(DESTDIR)/$(sysconfdir)/bash_completion.d ] ||
$(INSTALL) -d $(DESTDIR)/$(sysconfdir)/bash_completion.d
[ -f $(DESTDIR)/$(sysconfdir)/keymgr-completion.sh ] || \
$(INSTALL_DATA) keymgr-completion.sh $(DESTDIR)/$(sysconfdir)/bash_completion.d/
[ -d $(DESTDIR)/$(datadir)/zsh/functions/Completion/Knot ] || \
$(INSTALL) -d $(DESTDIR)/$(datadir)/zsh/functions/Completion/Knot
[ -f $(DESTDIR)/$(datadir)/zsh/functions/Completion/Knot/_keymgr ] || \
$(INSTALL_DATA) keymgr-completion.zsh $(DESTDIR)/$(datadir)/zsh/functions/Completion/Knot/_keymgr
uninstall-local:
[ -f $(DESTDIR)/$(config_dir)/knot.sample.conf ] && \
rm -f $(DESTDIR)/$(config_dir)/knot.sample.conf
[ -f $(DESTDIR)/$(config_dir)/example.com.zone ] && \
rm -f $(DESTDIR)/$(config_dir)/example.com.zone
[ -f $(DESTDIR)/$(sysconfdir)/keymgr-completion.sh ] && \
rm -f $(DESTDIR)/$(sysconfdir)/bash_completion.d/keymgr
[ -f $(DESTDIR)/$(datadir)/zsh/functions/Completion/Knot/_keymgr ] && \
rm -f $(DESTDIR)/$(datadir)/zsh/functions/Completion/Knot/_keymgr
endif # HAVE_DAEMON
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment