Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting of bash completion path #301

Merged
merged 1 commit into from
Mar 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ endif
ifdef BASH_COMPLETION
datarootdir = $(BASH_COMPLETION)
else
datarootdir = $(prefix)/share
datarootdir = $(prefix)/share/bash_completion.d
endif

# Dynamically detect/generate version file as necessary
Expand Down Expand Up @@ -64,22 +64,22 @@ clean: test-pre-clean

install: installdirs
$(INSTALL_PROGRAM) todo.sh $(DESTDIR)$(bindir)/todo.sh
$(INSTALL_DATA) todo_completion $(DESTDIR)$(datarootdir)/bash_completion.d/todo
$(INSTALL_DATA) todo_completion $(DESTDIR)$(datarootdir)/todo
[ -e $(DESTDIR)$(sysconfdir)/todo/config ] || \
sed "s/^\(export[ \t]*TODO_DIR=\).*/\1~\/.todo/" todo.cfg > $(DESTDIR)$(sysconfdir)/todo/config

uninstall:
rm -f $(DESTDIR)$(bindir)/todo.sh
rm -f $(DESTDIR)$(datarootdir)/bash_completion.d/todo
rm -f $(DESTDIR)$(datarootdir)/todo
rm -f $(DESTDIR)$(sysconfdir)/todo/config

rmdir $(DESTDIR)$(datarootdir)/bash_completion.d
rmdir $(DESTDIR)$(datarootdir)
rmdir $(DESTDIR)$(sysconfdir)/todo

installdirs:
mkdir -p $(DESTDIR)$(bindir) \
$(DESTDIR)$(sysconfdir)/todo \
$(DESTDIR)$(datarootdir)/bash_completion.d
$(DESTDIR)$(datarootdir)

#
# Testing
Expand All @@ -100,4 +100,5 @@ test: aggregate-results
rm -rf tests/test-results

# Force tests to get run every time
.PHONY: test test-pre-clean aggregate-results $(TESTS)
.PHONY: test test-pre-clean aggregate-results $(TESTS)