mirror of
https://github.com/erkin/ponysay.git
synced 2024-11-25 05:47:59 +01:00
kms and setup fix
Signed-off-by: Mattias Andrée <maandree@operamail.com>
This commit is contained in:
parent
0fc2fcafda
commit
8c0b930ba5
2 changed files with 6 additions and 7 deletions
5
setup.py
5
setup.py
|
@ -700,7 +700,6 @@ class Setup():
|
|||
ponyshare = conf['share-dir']
|
||||
if not ponyshare.endswith('/'):
|
||||
ponyshare += '/'
|
||||
ponyshare += 'ponysay/'
|
||||
for dir in sharedirs:
|
||||
if conf[dir[0]] is not None:
|
||||
dirs.append(ponyshare + dir[0])
|
||||
|
@ -998,8 +997,8 @@ class Setup():
|
|||
key = dir + '-dir'
|
||||
if opts['--' + key] is not None:
|
||||
conf[key] = opts['--' + key][0]
|
||||
if (dir == 'share') and (opts['--opt'] is None):
|
||||
conf[key] += '/ponysay'
|
||||
if (dir == 'share') and (opts['--opt'] is None):
|
||||
conf[key] += '/ponysay'
|
||||
if conf[key].startswith('usr/'):
|
||||
conf[key] = prefix + conf[key][3:]
|
||||
if opts['--cache-dir'] is not None:
|
||||
|
|
|
@ -129,13 +129,13 @@ class KMS():
|
|||
cachev.write(KMS_VERSION)
|
||||
if shared:
|
||||
try:
|
||||
os.chmod(cachedir + '/.version', 0o666)
|
||||
os.chmod(cachedir + '/.version', 0o7777)
|
||||
except:
|
||||
pass
|
||||
|
||||
## Get kmspony directory and kmspony file
|
||||
kmsponies = cachedir + '/kmsponies/' + palettefile
|
||||
kmspony = (kmsponies + pony).replace('//', '/')
|
||||
kmspony = kmsponies + '/' + pony
|
||||
|
||||
## If the kmspony is missing, create it
|
||||
if not os.path.isfile(kmspony):
|
||||
|
@ -150,7 +150,7 @@ class KMS():
|
|||
if not os.path.isdir(kmsponydir):
|
||||
os.makedirs(kmsponydir)
|
||||
if shared:
|
||||
Popen('chmod -R 7777 -- ' + _cachedir, shell=True).wait()
|
||||
Popen('chmod -R 7777 -- %s/kmsponies' % _cachedir, shell=True).wait()
|
||||
ponytoolcmd = 'ponytool --import ponysay --file %s --export ponysay --file %s --platform linux '
|
||||
ponytoolcmd += '--balloon n --colourful y --fullcolour y --left - --right - --top - --bottom - --palette %s'
|
||||
if not os.system(ponytoolcmd % (_pony, _kmspony, palette)) == 0:
|
||||
|
@ -158,7 +158,7 @@ class KMS():
|
|||
exit(1)
|
||||
if shared:
|
||||
try:
|
||||
os.chmod(kmspony, 0o666)
|
||||
os.chmod(kmspony, 0o7777)
|
||||
except:
|
||||
pass
|
||||
|
||||
|
|
Loading…
Reference in a new issue