mirror of
https://github.com/niess/python-appimage.git
synced 2026-03-15 04:40:15 +01:00
Add install command & reorganize
This commit is contained in:
26
python_appimage/commands/install.py
Normal file
26
python_appimage/commands/install.py
Normal file
@@ -0,0 +1,26 @@
|
||||
import os
|
||||
|
||||
from ..utils import deps
|
||||
from ..utils.log import log
|
||||
|
||||
|
||||
|
||||
|
||||
__all__ = ['execute']
|
||||
|
||||
|
||||
def _unpack_args(args):
|
||||
'''Unpack command line arguments
|
||||
'''
|
||||
return args.binary
|
||||
|
||||
|
||||
def execute(*args):
|
||||
'''Install the requested dependencies
|
||||
'''
|
||||
bindir = os.path.dirname(deps.PATCHELF)
|
||||
for binary in args:
|
||||
installed = getattr(deps, 'ensure_' + binary)()
|
||||
words = 'has been' if installed else 'already'
|
||||
log('INSTALL',
|
||||
'{:} {:} installed in {:}'.format(binary, words, bindir))
|
||||
Reference in New Issue
Block a user