#!/bin/sh deploy_path= $DEPLOY _target_location is_elastic=%private__suportelastic% #IS_ELASTIC = ' false '; if [! $IS _elastic] | | [$IS _elastic = true]; Then application_url= $PRIVATE __download_file_url fi if [$IS _elastic = false]; Then application_url=%private__application_url% fi if [! $APPLICATION _url]; Then echo "In deploy Tomcat script the Application_url is empty" Exit fi if [! $DEPLOY _PA TH]; Then echo "The Deploy path is empty" deploy_path= "/usr/local/tomcat/webapps" fi #analyze%private__applic
ation_url% arr= (${application_url//\//}) length=${#arr [@]} private__application_package_name=${arr[$length-1]} echo "Deploy path" $DEPLOY _path echo "Application name" $PRIVATE __application_package_name remove_file=${private__ application_package_name%.*} CD $DEPLOY _path rm-rf remove_file* rm-rf docs examples Host-manager Manager wget-o $PRIVA Te__application_package_name $APPLICATION _url file_type=${private__application_package_name##*.} echo "File type is" $file _type if [$file _type = "GZ"] then echo "Unzip tool tar ..." tar-zxf $PRIVAT E__application_package_name elif [$file _type = "tar"] then echo "Unzip tool tar ..." TAR-XF $PRIVATE __a Pplication_package_name elif [$file _type = "zip"] then echo "Unzip tool nuzip ..." Unzip-o $PRIVATE __appl Ication_package_name elif [$file _type = = "war"] then echo "War ..." fi