Add a which command for locating binary deps

This commit is contained in:
Valentin Niess
2020-03-30 01:23:09 +02:00
parent 4eb7011425
commit 7cdb1fb646
3 changed files with 34 additions and 3 deletions

View File

@@ -0,0 +1,21 @@
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(binary):
'''Print the location of a binary dependency
'''
path = os.path.join(os.path.dirname(deps.PATCHELF), binary)
if os.path.exists(path):
print(path)