fix shell completion install paths

If the string "ponysay" was in the install prefix, it was replaced by the name of
the command, and the prefix should not change.

Fixes #223.
This commit is contained in:
Tim D. Smith 2015-09-13 11:19:01 -07:00
parent 21395edbb4
commit 44fb0f8582

View file

@ -606,7 +606,9 @@ class Setup():
for command in commands:
if conf[command] is not None:
src = 'completion/%s-completion.%s.install' % (shell, command)
dest = conf[shell].replace('ponysay', command)
dest = os.path.join(
os.path.dirname(conf[shell]),
os.path.basename(conf[shell]).replace('ponysay', command))
self.cp(False, src, [dest])
if conf['pdf'] is not None:
src = 'ponysay.pdf' + ('' if conf['pdf-compression'] is None else '.' + conf['pdf-compression'])