134bb443eSAnthony Liguori#!/bin/bash -e 234bb443eSAnthony Liguori# 334bb443eSAnthony Liguori# QEMU Release Script 434bb443eSAnthony Liguori# 534bb443eSAnthony Liguori# Copyright IBM, Corp. 2012 634bb443eSAnthony Liguori# 734bb443eSAnthony Liguori# Authors: 834bb443eSAnthony Liguori# Anthony Liguori <aliguori@us.ibm.com> 934bb443eSAnthony Liguori# 1034bb443eSAnthony Liguori# This work is licensed under the terms of the GNU GPLv2 or later. 1134bb443eSAnthony Liguori# See the COPYING file in the top-level directory. 1234bb443eSAnthony Liguori 13*9bd0bcc3SThomas Huthif [ $# -ne 2 ]; then 14*9bd0bcc3SThomas Huth echo "Usage:" 15*9bd0bcc3SThomas Huth echo " $0 gitrepo version" 16*9bd0bcc3SThomas Huth exit 0 17*9bd0bcc3SThomas Huthfi 18*9bd0bcc3SThomas Huth 1934bb443eSAnthony Liguorisrc="$1" 2034bb443eSAnthony Liguoriversion="$2" 2134bb443eSAnthony Liguoridestination=qemu-${version} 2234bb443eSAnthony Liguori 2334bb443eSAnthony Liguorigit clone "${src}" ${destination} 2434bb443eSAnthony Liguoripushd ${destination} 2534bb443eSAnthony Liguorigit checkout "v${version}" 2634bb443eSAnthony Liguorigit submodule update --init 278648fcd5SAndreas Färber(cd roms/seabios && git describe --tags --long --dirty > .version) 283fccd3f2SMichael Roth(cd roms/skiboot && ./make_version.sh > .version) 2945c61c6cSMichael Roth# Fetch edk2 submodule's submodules, since it won't have access to them via 3045c61c6cSMichael Roth# the tarball later. 3145c61c6cSMichael Roth# 3245c61c6cSMichael Roth# A more uniform way to handle this sort of situation would be nice, but we 3345c61c6cSMichael Roth# don't necessarily have much control over how a submodule handles its 3445c61c6cSMichael Roth# submodule dependencies, so we continue to handle these on a case-by-case 3545c61c6cSMichael Roth# basis for now. 36bd0da3a3SPhilippe Mathieu-Daudé(cd roms/edk2 && \ 37bd0da3a3SPhilippe Mathieu-Daudé git submodule update --init -- \ 38bd0da3a3SPhilippe Mathieu-Daudé ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 \ 39bd0da3a3SPhilippe Mathieu-Daudé BaseTools/Source/C/BrotliCompress/brotli \ 40bd0da3a3SPhilippe Mathieu-Daudé CryptoPkg/Library/OpensslLib/openssl \ 41bd0da3a3SPhilippe Mathieu-Daudé MdeModulePkg/Library/BrotliCustomDecompressLib/brotli) 4234bb443eSAnthony Liguoripopd 43d0081e8fSCole Robinsontar --exclude=.git -cjf ${destination}.tar.bz2 ${destination} 4434bb443eSAnthony Liguorirm -rf ${destination} 45