添加安装springboot脚本

This commit is contained in:
Zhang Peng 2018-02-09 14:28:04 +08:00
parent 3e702ecfb6
commit c08fb0d3d6
2 changed files with 28 additions and 8 deletions

View File

@ -4,7 +4,7 @@
# Author: Zhang Peng # Author: Zhang Peng
################################################################################### ###################################################################################
function printBeginning() { function printHeadInfo() {
cat << EOF cat << EOF
*********************************************************************************** ***********************************************************************************
* Welcome to using the deployment script for Centos. * Welcome to using the deployment script for Centos.
@ -13,7 +13,7 @@ cat << EOF
EOF EOF
} }
function printEnding() { function printFootInfo() {
cat << EOF cat << EOF
*********************************************************************************** ***********************************************************************************
* Deployment is over. * Deployment is over.
@ -54,22 +54,27 @@ cat << EOF
[jdk8] install jdk8 [maven] install maven [jdk8] install jdk8 [maven] install maven
[tomcat] install tomcat8 [nginx] install nginx [tomcat] install tomcat8 [nginx] install nginx
[nodejs] install node.js [elk] install elk [nodejs] install node.js [elk] install elk
【3 - Recommended Tools】
[sdk] install sdkman [sdk] install sdkman
[springboot] install spring boot cli
Press <CTRL-D> to exit Press <CTRL-D> to exit
Please input key Please input key
EOF EOF
} }
function chooseOper() {
key="" key=""
filepath=$(cd "$(dirname "$0")"; pwd) filepath=$(cd "$(dirname "$0")"; pwd)
function chooseOper() {
while read key while read key
do do
case ${key} in case ${key} in
# 2 - System Environment
sys ) ${filepath}/sys/init.sh;; sys ) ${filepath}/sys/init.sh;;
libs ) ${filepath}/lib/install-libs.sh;; libs ) ${filepath}/lib/install-libs.sh;;
# 2 - Common Tools
2 | tools ) ${filepath}/tool/install-all.sh;; 2 | tools ) ${filepath}/tool/install-all.sh;;
git ) ${filepath}/tool/git/install-git.sh;; git ) ${filepath}/tool/git/install-git.sh;;
svn ) ${filepath}/tool/svn/install-svn.sh;; svn ) ${filepath}/tool/svn/install-svn.sh;;
@ -79,7 +84,11 @@ function chooseOper() {
nodejs ) ${filepath}/tool/nodejs/install-nodejs.sh;; nodejs ) ${filepath}/tool/nodejs/install-nodejs.sh;;
tomcat ) ${filepath}/tool/tomcat/install-tomcat8.sh;; tomcat ) ${filepath}/tool/tomcat/install-tomcat8.sh;;
elk ) ${filepath}/tool/elk/install-elk.sh;; elk ) ${filepath}/tool/elk/install-elk.sh;;
# 3 - Recommended Tools
sdk ) ${filepath}/tool/sdk/install-sdk.sh;; sdk ) ${filepath}/tool/sdk/install-sdk.sh;;
springboot ) ${filepath}/tool/springboot/install-springboot.sh;;
* ) echo "${key} is invalid key";; * ) echo "${key} is invalid key";;
esac esac
@ -87,11 +96,9 @@ function chooseOper() {
done done
} }
######################################## MAIN ######################################## ######################################## MAIN ########################################
printBeginning printHeadInfo
checkOsVersion 0 checkOsVersion 0
showMenu showMenu
chooseOper chooseOper
printEnding printFootInfo

View File

@ -0,0 +1,13 @@
#!/bin/bash -l
echo -e "\n>>>>>>>>> install springboot"
sdk version
execode=$?
if [ "${execode}" != "0" ]; then
echo "请先安装 sdkman"
exit 1
fi
sdk install springboot
spring --version