mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 09:03:07 +02:00
Also install bash completion on system where pkg-config is missing but the default bash completion dir exists
This commit is contained in:
parent
a106f15d95
commit
2ac2083f60
1 changed files with 4 additions and 5 deletions
|
|
@ -443,11 +443,10 @@ def get_bash_completion_path(root, share, info):
|
|||
try:
|
||||
path = check_output('pkg-config --variable=completionsdir bash-completion'.split()).strip().partition(os.pathsep)[0]
|
||||
except Exception:
|
||||
info('Failed to find directory to install bash completions, skipping.')
|
||||
return None
|
||||
else:
|
||||
if os.path.exists(path):
|
||||
return os.path.join(path, 'calibre')
|
||||
info('Failed to find directory to install bash completions, using default.')
|
||||
path = '/usr/share/bash-completion/completions'
|
||||
if path and os.path.exists(path) and os.path.isdir(path):
|
||||
return os.path.join(path, 'calibre')
|
||||
else:
|
||||
# Use the default bash-completion dir under staging_share
|
||||
return os.path.join(share, 'bash-completion', 'completions', 'calibre')
|
||||
|
|
|
|||
Loading…
Reference in a new issue