Message ID | 20170908095506.13594-11-famz@redhat.com |
---|---|
State | New |
Headers | show
Return-Path: <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=<UNKNOWN>) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xpXsL5h8wz9s7C for <incoming@patchwork.ozlabs.org>; Fri, 8 Sep 2017 20:01:25 +1000 (AEST) Received: from localhost ([::1]:44262 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>) id 1dqG6F-0004D0-5H for incoming@patchwork.ozlabs.org; Fri, 08 Sep 2017 06:01:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41651) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <famz@redhat.com>) id 1dqG0e-0007p0-69 for qemu-devel@nongnu.org; Fri, 08 Sep 2017 05:55:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <famz@redhat.com>) id 1dqG0Z-0004XR-IJ for qemu-devel@nongnu.org; Fri, 08 Sep 2017 05:55:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42972) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <famz@redhat.com>) id 1dqG0Z-0004Wf-CR for qemu-devel@nongnu.org; Fri, 08 Sep 2017 05:55:31 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 547A7C057FAD; Fri, 8 Sep 2017 09:55:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 547A7C057FAD Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=famz@redhat.com Received: from lemon.redhat.com (ovpn-12-98.pek2.redhat.com [10.72.12.98]) by smtp.corp.redhat.com (Postfix) with ESMTP id 15647610B0; Fri, 8 Sep 2017 09:55:28 +0000 (UTC) From: Fam Zheng <famz@redhat.com> To: qemu-devel@nongnu.org Date: Fri, 8 Sep 2017 17:54:38 +0800 Message-Id: <20170908095506.13594-11-famz@redhat.com> In-Reply-To: <20170908095506.13594-1-famz@redhat.com> References: <20170908095506.13594-1-famz@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 08 Sep 2017 09:55:30 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 10/38] scripts: Add archive-source.sh X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Peter Maydell <peter.maydell@linaro.org> Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> |
Series |
[PULL,01/38] docker: ensure NOUSER for travis images
|
expand
|
diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh new file mode 100755 index 0000000000..3cae7f34d3 --- /dev/null +++ b/scripts/archive-source.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# +# Author: Fam Zheng <famz@redhat.com> +# +# Create archive of source tree, including submodules +# +# This work is licensed under the terms of the GNU GPL, version 2. +# See the COPYING file in the top-level directory. + +set -e + +if test $# -lt 1; then + echo "Usage: $0 <output>" + exit 1 +fi + +submodules=$(git submodule foreach --recursive --quiet 'echo $name') + +if test -n "$submodules"; then + { + git ls-files + for sm in $submodules; do + (cd $sm; git ls-files) | sed "s:^:$sm/:" + done + } | grep -x -v $(for sm in $submodules; do echo "-e $sm"; done) > $1.list +else + git ls-files > $1.list +fi + +tar -cf $1 -T $1.list +rm $1.list
Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20170905021201.25684-4-famz@redhat.com> --- scripts/archive-source.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 scripts/archive-source.sh