mirror of
https://github.com/niess/python-appimage.git
synced 2026-03-14 04:10:15 +01:00
Patch which appimagetool
This commit is contained in:
@@ -16,6 +16,9 @@ def _unpack_args(args):
|
||||
def execute(binary):
|
||||
'''Print the location of a binary dependency
|
||||
'''
|
||||
path = os.path.join(os.path.dirname(deps.PATCHELF), binary)
|
||||
if binary == 'appimagetool':
|
||||
path = deps.ensure_appimagetool(dry=True)
|
||||
else:
|
||||
path = os.path.join(os.path.dirname(deps.PATCHELF), binary)
|
||||
if os.path.exists(path):
|
||||
print(path)
|
||||
|
||||
@@ -31,7 +31,7 @@ EXCLUDELIST = PREFIX + '/data/excludelist'
|
||||
PATCHELF = os.path.expanduser('~/.local/bin/patchelf')
|
||||
'''Location of the PatchELF binary'''
|
||||
|
||||
def ensure_appimagetool():
|
||||
def ensure_appimagetool(dry=False):
|
||||
'''Fetch appimagetool from the web if not available locally
|
||||
'''
|
||||
|
||||
@@ -44,7 +44,7 @@ def ensure_appimagetool():
|
||||
appdir = os.path.join(APPIMAGETOOL_DIR, appdir_name)
|
||||
apprun = os.path.join(appdir, 'AppRun')
|
||||
|
||||
if os.path.exists(apprun):
|
||||
if dry or os.path.exists(apprun):
|
||||
return apprun
|
||||
appimage = 'appimagetool-{0:}.AppImage'.format(_ARCH)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user