diff options
author | Andrew Lynch <andrew.lynch@ni.com> | 2018-01-29 14:49:56 -0600 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-01-30 06:48:41 +0100 |
commit | 21be43d40a0fe33af9597e77fb3465caa7079033 (patch) | |
tree | 49f1706c94231f8e794020c7a3adc3fc6c9cb4ad /images | |
parent | dca3914516e8cb2aee4dd5173bb806afce09f59b (diff) | |
download | uhd-21be43d40a0fe33af9597e77fb3465caa7079033.tar.gz uhd-21be43d40a0fe33af9597e77fb3465caa7079033.tar.bz2 uhd-21be43d40a0fe33af9597e77fb3465caa7079033.zip |
utils: populate_images: update arguments for uhd_images_downloader
Reviewed-by: Martin Braun <martin.braun@ettus.com>
Diffstat (limited to 'images')
-rwxr-xr-x | images/populate_images.py | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/images/populate_images.py b/images/populate_images.py index be204e4a0..20fcb7028 100755 --- a/images/populate_images.py +++ b/images/populate_images.py @@ -21,35 +21,21 @@ current commit. """ import os -import re import subprocess import uhdimgs -def get_md5_and_zipfilename(): - """ Return MD5 hash and ZIP filename from the host/CMakeLists.txt file. """ - cmakef = open(uhdimgs.get_cmake_main_file(), 'r').read() - md5_regex = re.compile(r'UHD_IMAGES_MD5SUM\s*"(?P<md5>[0-9a-f]{32})', flags=re.MULTILINE) - md5 = md5_regex.search(cmakef).groups('md5')[0] - filename_regex = re.compile(r'UHD_IMAGES_DOWNLOAD_SRC\s*"(?P<filename>[^"]*\.zip)', flags=re.MULTILINE) - filename = filename_regex.search(cmakef).groups('filename')[0] - return (md5, filename) - def main(): " Go, go, go! " # Switch to correct dir img_root_dir = os.path.join(uhdimgs.get_images_dir(), 'images') os.chdir(uhdimgs.get_images_dir()) - # Read out the CMakeLists.txt file, get filename - print "== Reading MD5 and ZIP filename for current commit from {0}...".format(uhdimgs.get_cmake_main_file()) - (md5, filename) = get_md5_and_zipfilename() print "== Starting download..." try: downloader_cmd = [ 'python', '../host/utils/uhd_images_downloader.py.in', '-i', img_root_dir, - '-f', filename, - '-c', md5 + '-m', 'manifest.txt' ] subprocess.check_call(downloader_cmd) except (subprocess.CalledProcessError, OSError): |