mirror of
https://github.com/cupcakearmy/ixesha.git
synced 2024-12-22 16:16:24 +00:00
Version 1.1
This commit is contained in:
parent
ec2f667298
commit
640cb776a5
28
ixesha
28
ixesha
@ -1,5 +1,7 @@
|
|||||||
#! /usr/bin/env python3
|
#! /usr/bin/env python3
|
||||||
|
|
||||||
|
__version__ = '1.1'
|
||||||
|
|
||||||
from sys import argv
|
from sys import argv
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
from shutil import copy
|
from shutil import copy
|
||||||
@ -34,20 +36,34 @@ parser.add_argument('-o', '--to', '--output', nargs=1, dest='output', metavar='<
|
|||||||
|
|
||||||
|
|
||||||
def install():
|
def install():
|
||||||
copy(
|
i = os.path.abspath(__file__)
|
||||||
os.path.abspath(__file__),
|
o = os.path.join(
|
||||||
os.path.abspath(S['installDir']))
|
os.path.abspath(S['installDir']),
|
||||||
|
os.path.basename(__file__)
|
||||||
|
)
|
||||||
|
|
||||||
|
if os.path.exists(o):
|
||||||
|
print('{app} already installed in: {path}'.format(
|
||||||
|
app=S['app'], path=S['installDir']))
|
||||||
|
return
|
||||||
|
|
||||||
|
copy(i, o)
|
||||||
print('Successfully installed {app} in: {path}'.format(
|
print('Successfully installed {app} in: {path}'.format(
|
||||||
app=S['app'], path=S['installDir']))
|
app=S['app'], path=S['installDir']))
|
||||||
|
|
||||||
|
|
||||||
def uninstall():
|
def uninstall():
|
||||||
os.remove(
|
o = os.path.join(
|
||||||
os.path.join(
|
|
||||||
os.path.abspath(S['installDir']),
|
os.path.abspath(S['installDir']),
|
||||||
os.path.basename(__file__)
|
os.path.basename(__file__)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
if not os.path.exists(o):
|
||||||
|
print('{app} not installed in: {path}'.format(
|
||||||
|
app=S['app'], path=S['installDir']))
|
||||||
|
return
|
||||||
|
|
||||||
|
os.remove(o)
|
||||||
print('Successfully uninstalled {app} from: {path}'.format(
|
print('Successfully uninstalled {app} from: {path}'.format(
|
||||||
app=S['app'], path=S['installDir']))
|
app=S['app'], path=S['installDir']))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user