Return-Path: X-Original-To: apmail-kylin-commits-archive@minotaur.apache.org Delivered-To: apmail-kylin-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6774018417 for ; Tue, 22 Mar 2016 02:07:25 +0000 (UTC) Received: (qmail 62001 invoked by uid 500); 22 Mar 2016 02:07:25 -0000 Delivered-To: apmail-kylin-commits-archive@kylin.apache.org Received: (qmail 61963 invoked by uid 500); 22 Mar 2016 02:07:25 -0000 Mailing-List: contact commits-help@kylin.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kylin.apache.org Delivered-To: mailing list commits@kylin.apache.org Received: (qmail 61953 invoked by uid 99); 22 Mar 2016 02:07:25 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Mar 2016 02:07:25 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0C1E9DFB7B; Tue, 22 Mar 2016 02:07:25 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: lidong@apache.org To: commits@kylin.apache.org Message-Id: <7a8657eed1cd408eac63a0e49fbfafdc@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: kylin git commit: KYLIN_1514 Fix MD5 validation of tomcat when package tar Date: Tue, 22 Mar 2016 02:07:25 +0000 (UTC) Repository: kylin Updated Branches: refs/heads/master 483a8806a -> 2850586c8 KYLIN_1514 Fix MD5 validation of tomcat when package tar Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/2850586c Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/2850586c Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/2850586c Branch: refs/heads/master Commit: 2850586c85a4df26843d8df5d175ea209f613639 Parents: 483a880 Author: lidongsjtu Authored: Tue Mar 22 10:06:41 2016 +0800 Committer: lidongsjtu Committed: Tue Mar 22 10:06:41 2016 +0800 ---------------------------------------------------------------------- build/script/download-tomcat.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/2850586c/build/script/download-tomcat.sh ---------------------------------------------------------------------- diff --git a/build/script/download-tomcat.sh b/build/script/download-tomcat.sh index e11aa6f..ea2b86e 100755 --- a/build/script/download-tomcat.sh +++ b/build/script/download-tomcat.sh @@ -22,18 +22,24 @@ cd ${dir}/../.. rm -rf build/tomcat +alias md5cmd="md5sum" +if [[ `uname -a` =~ "Darwin" ]]; then + alias md5cmd="md5 -q" +fi + if [ ! -f "build/apache-tomcat-7.0.59.tar.gz" ] then echo "no binary file found" wget --directory-prefix=build/ http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.59/bin/apache-tomcat-7.0.59.tar.gz || echo "download tomcat failed" else - if [ `md5sum apache-tomcat-7.0.59.tar.gz | awk '{print $1}'` != "ec570258976edf9a833cd88fd9220909" ] + if [ `md5cmd build/apache-tomcat-7.0.59.tar.gz | awk '{print $1}'` != "ec570258976edf9a833cd88fd9220909" ] then echo "md5 check failed" - rm apache-tomcat-7.0.59.tar.gz + rm build/apache-tomcat-7.0.59.tar.gz wget --directory-prefix=build/ http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.59/bin/apache-tomcat-7.0.59.tar.gz || echo "download tomcat failed" fi fi +unalias md5cmd tar -zxvf build/apache-tomcat-7.0.59.tar.gz -C build/ mv build/apache-tomcat-7.0.59 build/tomcat