From 6460ac1c3c3bf82e16f70dadff5e01211832c3ed Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Fri, 9 Jan 2015 10:49:31 +0100 Subject: images: Updated image creation scripts to include .tar.gz and .tar.xz --- images/make_zip.sh | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'images/make_zip.sh') diff --git a/images/make_zip.sh b/images/make_zip.sh index f07507a94..19695ef3f 100755 --- a/images/make_zip.sh +++ b/images/make_zip.sh @@ -23,14 +23,34 @@ if [ -n "$TAGFILES" ]; then rm $TAGFILES fi -# Run the CPack process: +# Enter build dir mkdir build cd build + +# Run the CPack process (ZIP file) cmake .. -DCPACK_GENERATOR=ZIP -DUHD_RELEASE_MODE="$1" .. make package mv uhd-images*.zip .. +# Run the CPack process (tarball) +cmake .. -DCPACK_GENERATOR=TGZ -DUHD_RELEASE_MODE="$1" .. +make package +mv uhd-images*.tar.gz .. + # Move images to here and clean up after us: cd .. rm -r build rm images/*.tag + +TGZ_ARCHIVE_NAME=`ls *.tar.gz | tail -n1` + +# CMake can't do xz, so do it by hand if possible +XZ_EXECUTABLE=`which xz` +if [ $? -eq 0 ]; then + XZ_ARCHIVE_NAME=`echo $TGZ_ARCHIVE_NAME | sed "s/gz\>/xz/"` + echo "Writing .xz tarball to $XZ_ARCHIVE_NAME ..." + gunzip --to-stdout $TGZ_ARCHIVE_NAME | xz - > $XZ_ARCHIVE_NAME +fi + +MD5_FILE_NAME=`echo $TGZ_ARCHIVE_NAME | sed "s/tar.gz\>/md5/"` +md5sum uhd-images* > $MD5_FILE_NAME -- cgit v1.2.3