kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liy...@apache.org
Subject [40/50] [abbrv] kylin git commit: KYLIN_1514 Fix MD5 validation of tomcat when package tar
Date Wed, 23 Mar 2016 06:59:29 GMT
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/26c6c0ab
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/26c6c0ab
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/26c6c0ab

Branch: refs/heads/1.3.x
Commit: 26c6c0ab9b26c18919fcbc93a82c90b554d0ef5e
Parents: 03165f3
Author: lidongsjtu <lidong@apache.org>
Authored: Tue Mar 22 10:14:55 2016 +0800
Committer: lidongsjtu <lidong@apache.org>
Committed: Tue Mar 22 10:14:55 2016 +0800

----------------------------------------------------------------------
 script/download-tomcat.sh | 13 +++++++++----
 script/package.sh         |  2 +-
 2 files changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/26c6c0ab/script/download-tomcat.sh
----------------------------------------------------------------------
diff --git a/script/download-tomcat.sh b/script/download-tomcat.sh
index c39a7e8..3836a16 100755
--- a/script/download-tomcat.sh
+++ b/script/download-tomcat.sh
@@ -22,21 +22,26 @@ cd ${dir}/..
 cd dist
 rm -rf tomcat
 
+alias md5cmd="md5sum"
+if [[ `uname -a` =~ "Darwin" ]]; then
+    alias md5cmd="md5 -q"
+fi
+
 if [ ! -f "apache-tomcat-7.0.59.tar.gz" ]
 then
     echo "not binary file found"
-    wget  http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.59/bin/apache-tomcat-7.0.59.tar.gz
|| echo "download tomcat failed"
+    wget 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 apache-tomcat-7.0.59.tar.gz | awk '{print $1}'` != "ec570258976edf9a833cd88fd9220909"
]
     then
         echo "md5 check failed"
         rm apache-tomcat-7.0.59.tar.gz
-        wget  http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.59/bin/apache-tomcat-7.0.59.tar.gz
|| echo "download tomcat failed"
+        wget 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 apache-tomcat-7.0.59.tar.gz
-
 mv apache-tomcat-7.0.59 tomcat
 rm -rf tomcat/webapps/*
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/26c6c0ab/script/package.sh
----------------------------------------------------------------------
diff --git a/script/package.sh b/script/package.sh
index 820dce2..a0d6eaa 100755
--- a/script/package.sh
+++ b/script/package.sh
@@ -49,7 +49,7 @@ fi
 
 dir=$(dirname ${0})
 cd ${dir}/..
-version=`mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version
| grep -E '^[0-9]+\.[0-9]+\.[0-9]+'`
+version=`mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version
| grep -v '\['`
 echo "kylin version: ${version}"
 export version
 


Mime
View raw message