mirror of
https://github.com/erkin/ponysay.git
synced 2024-11-22 12:27:59 +01:00
m ponyquotes build + setup args typo fix
This commit is contained in:
parent
db2d8f41fa
commit
1b78d94ef4
1 changed files with 7 additions and 6 deletions
13
setup.py
13
setup.py
|
@ -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()
|
||||||
|
|
Loading…
Reference in a new issue