Rename completion file 010_tuxpaint-completion.bash on install

See https://sourceforge.net/p/tuxpaint/bugs/290/#5205
h/t Jozef
This commit is contained in:
Bill Kendrick 2024-07-05 20:23:50 -07:00
parent 2c5a773575
commit 21aca21e3d
2 changed files with 14 additions and 4 deletions

View file

@ -773,6 +773,7 @@ uninstall: uninstall-i18n
-rm $(MAN_PREFIX)/*/man1/tp-magic-config.1.gz -rm $(MAN_PREFIX)/*/man1/tp-magic-config.1.gz
-rm -f -r $(CONFDIR) -rm -f -r $(CONFDIR)
-rm $(COMPLETIONDIR)/tuxpaint-completion.bash -rm $(COMPLETIONDIR)/tuxpaint-completion.bash
-rm $(COMPLETIONDIR)/010_tuxpaint-completion.bash
-rm -r $(MAGIC_PREFIX) -rm -r $(MAGIC_PREFIX)
-rm -r $(INCLUDE_PREFIX)/tuxpaint -rm -r $(INCLUDE_PREFIX)/tuxpaint
-rm $(BIN_PREFIX)/tp-magic-config -rm $(BIN_PREFIX)/tp-magic-config
@ -815,13 +816,18 @@ install-default-config:
@chmod 644 $(CONFDIR)/tuxpaint.conf @chmod 644 $(CONFDIR)/tuxpaint.conf
# Install BASH completion file: # Install BASH completion file:
# (Per https://sourceforge.net/p/tuxpaint/bugs/290/ naming
# in such a way that buggy bash-completion won't end up
# looking at our file before "000_bash_completion_compat.bash"
# under certain locales, due to different sorting / LC_COLLATE,
# and hence `have` being unavailable.)
.PHONY: install-bash-completion .PHONY: install-bash-completion
install-bash-completion: install-bash-completion:
@echo @echo
@echo "...Installing BASH completion file..." @echo "...Installing BASH completion file..."
@install -d $(COMPLETIONDIR) @install -d $(COMPLETIONDIR)
@cp src/tuxpaint-completion.bash $(COMPLETIONDIR) @cp src/tuxpaint-completion.bash $(COMPLETIONDIR)/010_tuxpaint-completion.bash
@chmod 644 $(COMPLETIONDIR)/tuxpaint-completion.bash @chmod 644 $(COMPLETIONDIR)/010_tuxpaint-completion.bash
# Install example stamps # Install example stamps

View file

@ -6,7 +6,7 @@ Copyright (c) 2002-2024
Various contributors (see below, and AUTHORS.txt) Various contributors (see below, and AUTHORS.txt)
https://tuxpaint.org/ https://tuxpaint.org/
2024.July.4 (0.9.33) 2024.July.5 (0.9.33)
* New Magic Tools: * New Magic Tools:
---------------- ----------------
* Dither & Dither (Keep Color): Replaces all or part of a drawing * Dither & Dither (Keep Color): Replaces all or part of a drawing
@ -109,7 +109,11 @@ https://tuxpaint.org/
* Make screen refresh more snappy on macOS. * Make screen refresh more snappy on macOS.
Mark Kim <markuskimius@gmail.com> Mark Kim <markuskimius@gmail.com>
* Replace `have` with `_have` in Tux Paint's BASH completion script. * Replace `have` with `_have` in Tux Paint's BASH completion script,
and rename as `010_tuxpaint-completion.bash` when installing, to
ensure `have` exists via `000_bash_completion_compat.bash`; under
some locales (LC_COLLATE), that could get ran _after_ Tux Paint's,
due to this bug: https://github.com/scop/bash-completion/issues/1207)
Closes https://sourceforge.net/p/tuxpaint/bugs/290/ Closes https://sourceforge.net/p/tuxpaint/bugs/290/
(h/t Jozef Riha for reporting) (h/t Jozef Riha for reporting)
Bill Kendrick <bill@newbreedsoftware.com> Bill Kendrick <bill@newbreedsoftware.com>