aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAshish Chaudhari <ashish@ettus.com>2014-10-24 17:30:54 -0700
committerAshish Chaudhari <ashish@ettus.com>2014-10-27 11:01:26 -0700
commitfebfbc98572af4eba90ed90b2f8a65a8a2616311 (patch)
tree65ec69011907319c48572cf6c91ba09aa4d693b2
parentb9303d85e241220eea3d57b181971e34a7e68d5f (diff)
downloaduhd-febfbc98572af4eba90ed90b2f8a65a8a2616311.tar.gz
uhd-febfbc98572af4eba90ed90b2f8a65a8a2616311.tar.bz2
uhd-febfbc98572af4eba90ed90b2f8a65a8a2616311.zip
utils: Minor fixes in images downloader and packaging scripts
-rw-r--r--host/utils/uhd_images_downloader.py.in3
-rwxr-xr-ximages/create_imgs_package.py2
-rwxr-xr-ximages/make_zip.sh2
3 files changed, 5 insertions, 2 deletions
diff --git a/host/utils/uhd_images_downloader.py.in b/host/utils/uhd_images_downloader.py.in
index 8a0754f49..5b16c7bb5 100644
--- a/host/utils/uhd_images_downloader.py.in
+++ b/host/utils/uhd_images_downloader.py.in
@@ -332,6 +332,9 @@ def main():
if options.verbose:
print "Image archive extracted to: %s" % (extract_path)
downloader.install_images(extract_path, images_dir, options.keep, print_progress=options.verbose)
+ if options.verbose:
+ print "Cleaning up temp location: %s" % (extract_path)
+ shutil.rmtree(extract_path)
print
print "Images successfully installed to: %s" % (images_dir)
except Exception, e:
diff --git a/images/create_imgs_package.py b/images/create_imgs_package.py
index 642edaebb..4b49390ce 100755
--- a/images/create_imgs_package.py
+++ b/images/create_imgs_package.py
@@ -38,7 +38,7 @@ def clear_img_dir(img_root_dir):
def get_zipfilename_from_cpack_output(cpoutput):
""" Parses the output of the ZIP-file creating script
and scrapes the actual file name. """
- regex = re.compile("\/build\/(?P<filename>.*\.zip)")
+ regex = re.compile("\/build\/(?P<filename>[^\/]+\.zip)")
results = regex.search(cpoutput)
return results.group('filename')
diff --git a/images/make_zip.sh b/images/make_zip.sh
index 0c59238a0..b2e9645ef 100755
--- a/images/make_zip.sh
+++ b/images/make_zip.sh
@@ -18,7 +18,7 @@ fi
if [ -e "images/LICENSE" ]; then
rm images/LICENSE
fi
-TAGFILES=`ls images/*.tag`
+TAGFILES=`ls images/*.tag 2>/dev/null`
if [ -n "$TAGFILES" ]; then
rm $TAGFILES
fi