aboutsummaryrefslogtreecommitdiffstats
path: root/images/create_imgs_package.py
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2021-12-17 14:04:58 +0100
committerAaron Rossetto <aaron.rossetto@ni.com>2021-12-17 11:18:53 -0600
commit30b157e4cf12dfe7e8a174548d8cfddd64d47c42 (patch)
tree77e2153225412f15b6a6cd66382997ed549c4d8a /images/create_imgs_package.py
parentc369b7046e1687bdb7b67a0fae2f1168f0088783 (diff)
downloaduhd-30b157e4cf12dfe7e8a174548d8cfddd64d47c42.tar.gz
uhd-30b157e4cf12dfe7e8a174548d8cfddd64d47c42.tar.bz2
uhd-30b157e4cf12dfe7e8a174548d8cfddd64d47c42.zip
images: Clear out code from days of yore
The images/ subdir is used to create images packages for release tags. However, it contained a lot of code from many releases ago, prior to the usage of the cache/ directory. This simply removes all the old code that is no longer required for creating release packages.
Diffstat (limited to 'images/create_imgs_package.py')
-rwxr-xr-ximages/create_imgs_package.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/images/create_imgs_package.py b/images/create_imgs_package.py
index 416242db1..a55e7902c 100755
--- a/images/create_imgs_package.py
+++ b/images/create_imgs_package.py
@@ -19,12 +19,13 @@
Command-line utility to create a .zip-file with the current image set.
"""
+import sys
import re
import os
import subprocess
import argparse
import shutil
-import uhdimgs
+import populate_images
def parse_args():
""" Parse args, duh """
@@ -39,7 +40,6 @@ def download_images(img_root_dir):
"""
Run the images downloader
"""
- import populate_images
populate_images.download_images(img_root_dir)
def get_version():
@@ -51,18 +51,18 @@ def get_version():
git_output = subprocess.check_output(git_cmd).decode('UTF-8')
except subprocess.CalledProcessError as ex:
print(ex.output)
- exit(1)
+ sys.exit(1)
print("Detected tag: {}".format(git_output))
version_mobj = re.search(r'[0-9]+\.[0-9]+\.[0-9]+\.[0-9]', git_output)
if version_mobj is None:
print("Error: Failure to resolve version from tag!")
- exit(1)
+ sys.exit(1)
return version_mobj.group(0)
def main():
""" Go, go, go! """
args = parse_args()
- img_root_dir = os.path.join(uhdimgs.get_images_dir(), 'images')
+ img_root_dir = os.path.join(populate_images.get_images_dir(), 'images')
print("== Clearing out the images directory at {}, if present...".format(img_root_dir))
shutil.rmtree(img_root_dir, ignore_errors=True)
print("== Downloading images...")
@@ -76,7 +76,7 @@ def main():
subprocess.call(archive_cmd)
except subprocess.CalledProcessError as ex:
print(ex.output)
- exit(1)
+ sys.exit(1)
print("== Done!")
if __name__ == "__main__":