diff options
author | Max Kellermann <max@duempel.org> | 2014-02-24 09:32:38 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-02-24 09:32:38 +0100 |
commit | 61161269d81de3c655e935b2644a85f5834d0f0e (patch) | |
tree | 9a0b82e9d5147fb102b73d86bcf8c4f4136ccc89 | |
parent | 8fe004e98e968e69d5e3f61ffce6715f73408294 (diff) | |
download | mpd-61161269d81de3c655e935b2644a85f5834d0f0e.tar.gz mpd-61161269d81de3c655e935b2644a85f5834d0f0e.tar.xz mpd-61161269d81de3c655e935b2644a85f5834d0f0e.zip |
android/build.py: add parameter that specifies a subdirectory
-rwxr-xr-x | android/build.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/android/build.py b/android/build.py index 110f08aab..3251f5ef5 100755 --- a/android/build.py +++ b/android/build.py @@ -127,11 +127,15 @@ def download_tarball(url, md5): class Project: def __init__(self, url, md5, installed, name=None, version=None, + base=None, use_cxx=False, use_clang=False): - basename = os.path.basename(url) - m = re.match(r'^(.+)\.(tar(\.(gz|bz2|xz|lzma))?|zip)$', basename) - if not m: raise - self.base = m.group(1) + if base is None: + basename = os.path.basename(url) + m = re.match(r'^(.+)\.(tar(\.(gz|bz2|xz|lzma))?|zip)$', basename) + if not m: raise + self.base = m.group(1) + else: + self.base = base if name is None or version is None: m = re.match(r'^([-\w]+)-(\d[\d.]*[a-z]?)$', self.base) |