From: "Jan Beulich" Subject: Re: [v3 for 4.5 2/2] make: Make "src-tarball" target actually make a source tarball Date: Tue, 16 Sep 2014 09:11:01 +0100 Message-ID: <54180CB50200007800035449@mail.emea.novell.com> References: <1410798304-22636-1-git-send-email-george.dunlap@eu.citrix.com> <1410798304-22636-2-git-send-email-george.dunlap@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1410798304-22636-2-git-send-email-george.dunlap@eu.citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: Anthony Perard , Ian Jackson , Olaf Hering , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 15.09.14 at 18:25, wrote: > --- /dev/null > +++ b/tools/misc/mktarball > @@ -0,0 +1,38 @@ > +#!/bin/bash > +# > +# mktarball: Make a release tarball (including xen, qemu, and qemu-traditional) > +# > +# Takes 2 arguments, the path to the dist directory and the version > +set -ex > + > +function git_archive_into { > + mkdir "$2" > + > + git --git-dir="$1"/.git \ > + archive --format=tar HEAD | \ Is HEAD really the right thing here? Jan > + tar Cxf "$2" - > +} > + > +if [[ -z "$1" || -z "$2" ]] ; then > + echo "usage: $0 path-to-XEN_ROOT xen-version" > + exit 1 > +fi > + > +xen_root="$1" > +desc="$2" > + > +tdir="$xen_root/dist/tmp.src-tarball" > + > +rm -rf $tdir > + > +mkdir -p $tdir > + > +git_archive_into $xen_root $tdir/xen-$desc > + > +git_archive_into $xen_root/tools/qemu-xen-dir-remote > $tdir/xen-$desc/tools/qemu-xen > + > +git_archive_into $xen_root/tools/qemu-xen-traditional-dir-remote > $tdir/xen-$desc/tools/qemu-xen-traditional > + > +GZIP=-9v tar cz -f $xen_root/dist/xen-$desc.tar.gz -C $tdir xen-$desc > + > +echo "Source tarball in $xen_root/dist/xen-$desc.tar.gz" > -- > 1.9.1