From 3aaf5fb857836dd64182482517d6f0cc2cd35017 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 29 Mar 2012 09:04:53 +0530 Subject: [PATCH] Linux installer; Fix completion for ebook-convert not working. Fixes #967834 (calibre-complete not functioning) --- src/calibre/linux.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/calibre/linux.py b/src/calibre/linux.py index 00f636a30f..bc51eb28e8 100644 --- a/src/calibre/linux.py +++ b/src/calibre/linux.py @@ -242,6 +242,10 @@ class PostInstall: if not os.path.exists(os.path.dirname(f)): os.makedirs(os.path.dirname(f)) self.manifest.append(f) + complete = 'calibre-complete' + if getattr(sys, 'frozen_path'): + complete = os.path.join(getattr(sys, 'frozen_path'), complete) + self.info('Installing bash completion to', f) with open(f, 'wb') as f: f.write('# calibre Bash Shell Completion\n') @@ -326,8 +330,8 @@ class PostInstall: } complete -o nospace -F _ebook_device ebook-device - complete -o nospace -C calibre-complete ebook-convert - ''')) + complete -o nospace -C %s ebook-convert + ''')%complete) except TypeError as err: if 'resolve_entities' in str(err): print 'You need python-lxml >= 2.0.5 for calibre'