From patchwork Thu Jul 26 09:34:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keng-Yu Lin X-Patchwork-Id: 173383 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 588032C008F for ; Thu, 26 Jul 2012 19:35:31 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SuKTi-0005JL-6T for incoming@patchwork.ozlabs.org; Thu, 26 Jul 2012 09:35:30 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SuKTf-0005JB-LO for fwts-devel@lists.ubuntu.com; Thu, 26 Jul 2012 09:35:27 +0000 Received: from [210.242.151.101] (helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SuKTe-0005iJ-Q9; Thu, 26 Jul 2012 09:35:27 +0000 From: Keng-Yu Lin To: fwts-devel@lists.ubuntu.com Subject: [RFC 4/6] auto-packager: mkpackage.sh to handle the released tarball Date: Thu, 26 Jul 2012 17:34:58 +0800 Message-Id: <1343295300-17440-5-git-send-email-kengyu@canonical.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1343295300-17440-1-git-send-email-kengyu@canonical.com> References: <1343295300-17440-1-git-send-email-kengyu@canonical.com> X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: fwts-devel-bounces@lists.ubuntu.com Errors-To: fwts-devel-bounces@lists.ubuntu.com Signed-off-by: Keng-Yu Lin Acked-by: Colin Ian King Acked-by: Ivan Hu --- auto-packager/mkpackage.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/auto-packager/mkpackage.sh b/auto-packager/mkpackage.sh index 8fe1f23..cd5e0ff 100755 --- a/auto-packager/mkpackage.sh +++ b/auto-packager/mkpackage.sh @@ -25,6 +25,7 @@ # RELEASES="lucid natty oneiric precise quantal" REPO=git://kernel.ubuntu.com/hwe/fwts.git +RELEASE_TAR_URL=http://kernel.ubuntu.com/~lexical/fwts FWTS=fwts # @@ -74,6 +75,27 @@ rm_source() } # +# Prepare the orig tarball +# + +prepare_tarball() +{ + mkdir $version + pushd $version >& /dev/null + wget -N $RELEASE_TAR_URL/fwts-$version.tar.gz + wget -N $RELEASE_TAR_URL/SHA256SUMS + sha256sum -c SHA256SUMS + + if [ $? -ne 0 ]; then + echo "Checksum unmatched. Abort" + exit + fi + + mv fwts-$version.tar.gz fwts_`echo $version|cut -b 2-`.orig.tar.gz + popd >& /dev/null +} + +# # Create source package ready for upload and build # mk_package() @@ -83,6 +105,7 @@ mk_package() rm -rf $version/$rel mkdir -p $version/$rel cp -r $FWTS $version/$rel + cp $version/fwts_`echo $version|cut -b 2-`.orig.tar.gz $version/$rel pushd $version/$rel/$FWTS >& /dev/null @@ -121,6 +144,8 @@ fi checkout_version $version rm_git +prepare_tarball + for I in $RELEASES do echo Building package for release $I with version $version