Commit a41d4e29 authored by Henrik Gramner's avatar Henrik Gramner Committed by Anton Mitrofanov

cli: Install bash autocomplete during 'make install'

parent 2e3caed2
Pipeline #19749 passed with stages
in 9 minutes and 35 seconds
......@@ -388,6 +388,10 @@ distclean: clean
install-cli: cli
$(INSTALL) -d $(DESTDIR)$(bindir)
$(INSTALL) x264$(EXE) $(DESTDIR)$(bindir)
ifneq ($(BASHCOMPLETIONSDIR),)
$(INSTALL) -d $(DESTDIR)$(BASHCOMPLETIONSDIR)
$(INSTALL) -m 644 -T $(SRCPATH)/tools/bash-autocomplete.sh $(DESTDIR)$(BASHCOMPLETIONSDIR)/x264
endif
install-lib-dev:
$(INSTALL) -d $(DESTDIR)$(includedir) $(DESTDIR)$(libdir)/pkgconfig
......@@ -418,6 +422,9 @@ ifneq ($(IMPLIBNAME),)
else ifneq ($(SONAME),)
rm -f $(DESTDIR)$(libdir)/$(SONAME) $(DESTDIR)$(libdir)/libx264.$(SOSUFFIX)
endif
ifneq ($(BASHCOMPLETIONSDIR),)
rm -f $(DESTDIR)$(BASHCOMPLETIONSDIR)/x264
endif
etags TAGS:
etags $(SRCS) $(SRCS_X) $(SRCS_8)
......@@ -1528,6 +1528,9 @@ fi
if [ "$cli" = "yes" ]; then
echo 'default: cli' >> config.mak
echo 'install: install-cli' >> config.mak
if pkg_check bash-completion ; then
echo "BASHCOMPLETIONSDIR=$($PKGCONFIG --variable=completionsdir bash-completion)" >> config.mak
fi
fi
if [ "$shared" = "yes" ]; then
......
  • FYI, this change is causing breakage in my current compile script.

    install: cannot create regular file '/usr/share/bash-completion/completions/x264': Permission denied.

    The script doesn't have super user permissions. I wouldn't want for it to touch anything in the system other than the designated folders with --prefix and --bindir. You should consider giving the opportunity to make a CLI install without touching global system files.

    Best, Nicola

  • mentioned in merge request !32 (merged)

    Toggle commit list
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