m ponyquotes build + setup args typo fix

This commit is contained in:
Mattias Andrée 2012-09-01 06:14:46 +02:00
parent db2d8f41fa
commit 1b78d94ef4

View file

@ -102,7 +102,7 @@ class Setup():
opts.add_argumentless(help = 'Only install explicitly included shell completions', opts.add_argumentless(help = 'Only install explicitly included shell completions',
alternatives = ['--without-shell' + '--without-shell-completion']) alternatives = ['--without-shell', '--without-shell-completion'])
opts.add_argumented (help = 'Set share/ directory used for shell completions\nDefault = $SHAREDIR', opts.add_argumented (help = 'Set share/ directory used for shell completions\nDefault = $SHAREDIR',
alternatives = ['--with-shell', '--with-shell-completion'], arg='SHAREDIR') alternatives = ['--with-shell', '--with-shell-completion'], arg='SHAREDIR')
@ -459,11 +459,12 @@ class Setup():
ponies = [line for line in ponymap.read().decode('utf-8', 'replace').split('\n')] ponies = [line for line in ponymap.read().decode('utf-8', 'replace').split('\n')]
for _ponies in ponies: for _ponies in ponies:
for pony in _ponies.split('+'): for pony in _ponies.split('+'):
print('Generating quote files for \033[34m' + pony + '\033[39m') if len(pony) > 0:
for file in os.listdir('ponyquotes'): print('Generating quote files for \033[34m' + pony + '\033[39m')
if file.startswith(pony + '.'): for file in os.listdir('ponyquotes'):
if os.path.isfile('ponyquotes/' + file): if file.startswith(pony + '.'):
shutil.copy('ponyquotes/' + file, 'quotes/' + _ponies + file[file.find('.'):]) if os.path.isfile('ponyquotes/' + file):
shutil.copy('ponyquotes/' + file, 'quotes/' + _ponies + file[file.find('.'):])
finally: finally:
if ponymap is not None: if ponymap is not None:
ponymap.close() ponymap.close()