Author: tchemit Date: 2014-05-30 08:48:14 +0200 (Fri, 30 May 2014) New Revision: 79 Url: http://forge.codelutin.com/projects/adminsys/repository/revisions/79 Log: fix tomcat get script for tomcat 6 (page has two releases....) Modified: demo-tools/tomcat/check-get-tomcat.sh Modified: demo-tools/tomcat/check-get-tomcat.sh =================================================================== --- demo-tools/tomcat/check-get-tomcat.sh 2014-05-29 20:33:48 UTC (rev 78) +++ demo-tools/tomcat/check-get-tomcat.sh 2014-05-30 06:48:14 UTC (rev 79) @@ -44,8 +44,9 @@ # @param $2 tomcat version 6, 7 or 8 getLastRelease () { local VERSION=$2 - local result=$(curl -s $MIRROR/tomcat-$VERSION/ |grep "href=.v" |sed -re 's/.*>v([0-9]+.[0-9]+.[0-9]+).*/\1/') - debug "last version is $result" + debug VERSION=$VERSION + result=$(curl -s $MIRROR/tomcat-$VERSION/ |grep "href=.v" |sed -re 's/.*>v([0-9]+.[0-9]+.[0-9]+).*/\1/' | tail -n 1) + debug "getLastRelease: $result" eval $1=\$result } @@ -55,7 +56,7 @@ local DIR=$(basename $LINK) local result=${DIR##*-} debug "getCurrentRelease: $result" - eval $1="$result" + eval $1=\$result } installRelease () {
participants (1)
-
tchemit@users.forge.codelutin.com