diff options
| author | Martin Braun <martin.braun@ettus.com> | 2014-10-13 11:39:28 +0200 | 
|---|---|---|
| committer | Martin Braun <martin.braun@ettus.com> | 2014-10-13 12:31:39 +0200 | 
| commit | b9ed377fcb9bd411cf7537b562fa7ac2314fb1d5 (patch) | |
| tree | 15840a50406acd202b219bd098566c9a5557ed28 | |
| parent | 0846590bb3596ec5d74f27be4b0d76bb3b064218 (diff) | |
| download | uhd-b9ed377fcb9bd411cf7537b562fa7ac2314fb1d5.tar.gz uhd-b9ed377fcb9bd411cf7537b562fa7ac2314fb1d5.tar.bz2 uhd-b9ed377fcb9bd411cf7537b562fa7ac2314fb1d5.zip | |
tools: Auto-build tgz image packages, too (not just zip)
Also, made image creation process easier.
| -rwxr-xr-x | images/make_zip.sh | 24 | 
1 files changed, 23 insertions, 1 deletions
| diff --git a/images/make_zip.sh b/images/make_zip.sh index 6c44324f9..0c59238a0 100755 --- a/images/make_zip.sh +++ b/images/make_zip.sh @@ -1,17 +1,39 @@  #!/bin/sh  # Automatically run the make-zip-file process +# Check we're in the right directory and all is set:  if [ ! -e 'make_zip.sh' ]; then -    echo 'Are you running this from the images/ directory?' +    echo '[ERROR] Are you running this from the images/ directory?'      exit 1  fi +if [ ! -e 'images' ]; then +    echo 'images subdirectory does not exist. Please create it and put all the images you want to package in there.' +    exit 1 +fi + +# Remove cruft before proceeding:  if [ -e 'build' ]; then      echo 'Please remove build subdirectory before proceeding.'      exit 1  fi +if [ -e "images/LICENSE" ]; then +	rm images/LICENSE +fi +TAGFILES=`ls images/*.tag` +if [ -n "$TAGFILES" ]; then +	rm $TAGFILES +fi + +# Run the CPack process:  mkdir build  cd build  cmake .. -DCPACK_GENERATOR=ZIP -DUHD_RELEASE_MODE="$1" ..  make package  mv uhd-images*.zip .. +cmake .. -DCPACK_GENERATOR=TGZ -DUHD_RELEASE_MODE="$1" .. +make package + +# Move images to here and clean up after us: +mv uhd-images*.tar.gz ..  cd ..  rm -r build +rm images/*.tag | 
