Skip to content

Commit

Permalink
Stop using pkg-config to get the bash completion dir
Browse files Browse the repository at this point in the history
Per [the bash_completion documentation](https://github.com/scop/bash-completion/blob/main/README.md), this is the preferred style as of new versions. It's also generally much simpler and more consistent with other options, so let's see if we can just switch over.
  • Loading branch information
nelhage authored Jan 15, 2025
1 parent 038ab61 commit e59ca8b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ test/victim: override LDFLAGS := $(VICTIM_LDFLAGS)
clean:
rm -f reptyr $(OBJS) test/victim.o test/victim $(DEPS)

BASHCOMPDIR ?= $(shell $(PKG_CONFIG) --variable=completionsdir bash-completion 2>/dev/null | sed -e 's,/usr,$(PREFIX),')
BASHCOMPDIR ?= $PREFIX/share/bash-completion/completions/

install: reptyr
install -d -m 755 $(DESTDIR)$(BINDIR)
Expand All @@ -50,10 +50,8 @@ install: reptyr
install -m 644 reptyr.1 $(DESTDIR)$(MANDIR)/man1/reptyr.1
install -d -m 755 $(DESTDIR)$(MANDIR)/fr/man1
install -m 644 reptyr.fr.1 $(DESTDIR)$(MANDIR)/fr/man1/reptyr.1
bashcompdir=$(BASHCOMPDIR) ; \
test -z "$$bashcompdir" && bashcompdir=/etc/bash_completion.d ; \
install -d -m 755 $(DESTDIR)$$bashcompdir ; \
install -m 644 reptyr.bash $(DESTDIR)$$bashcompdir/reptyr
install -d -m 755 $(DESTDIR)$(BASHCOMPDIR) ; \
install -m 644 reptyr.bash $(DESTDIR)$(BASHCOMPDIR)/reptyr

.PHONY: PHONY

Expand Down

0 comments on commit e59ca8b

Please sign in to comment.