Skip to content

Commit c08fb0d

Browse files
committed
✨ 添加安装springboot脚本
1 parent 3e702ec commit c08fb0d

2 files changed

Lines changed: 28 additions & 8 deletions

File tree

codes/deploy/main.sh

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Author: Zhang Peng
55
###################################################################################
66

7-
function printBeginning() {
7+
function printHeadInfo() {
88
cat << EOF
99
***********************************************************************************
1010
* Welcome to using the deployment script for Centos.
@@ -13,7 +13,7 @@ cat << EOF
1313
EOF
1414
}
1515

16-
function printEnding() {
16+
function printFootInfo() {
1717
cat << EOF
1818
***********************************************************************************
1919
* Deployment is over.
@@ -54,22 +54,27 @@ cat << EOF
5454
[jdk8] install jdk8 [maven] install maven
5555
[tomcat] install tomcat8 [nginx] install nginx
5656
[nodejs] install node.js [elk] install elk
57+
58+
【3 - Recommended Tools】
5759
[sdk] install sdkman
60+
[springboot] install spring boot cli
5861
5962
Press <CTRL-D> to exit
6063
Please input key:
6164
EOF
6265
}
6366

64-
key=""
65-
filepath=$(cd "$(dirname "$0")"; pwd)
6667
function chooseOper() {
68+
key=""
69+
filepath=$(cd "$(dirname "$0")"; pwd)
6770
while read key
6871
do
6972
case ${key} in
73+
# 2 - System Environment
7074
sys ) ${filepath}/sys/init.sh;;
7175
libs ) ${filepath}/lib/install-libs.sh;;
7276

77+
# 2 - Common Tools
7378
2 | tools ) ${filepath}/tool/install-all.sh;;
7479
git ) ${filepath}/tool/git/install-git.sh;;
7580
svn ) ${filepath}/tool/svn/install-svn.sh;;
@@ -79,19 +84,21 @@ function chooseOper() {
7984
nodejs ) ${filepath}/tool/nodejs/install-nodejs.sh;;
8085
tomcat ) ${filepath}/tool/tomcat/install-tomcat8.sh;;
8186
elk ) ${filepath}/tool/elk/install-elk.sh;;
87+
88+
# 3 - Recommended Tools
8289
sdk ) ${filepath}/tool/sdk/install-sdk.sh;;
90+
springboot ) ${filepath}/tool/springboot/install-springboot.sh;;
91+
8392
* ) echo "${key} is invalid key";;
8493
esac
8594

8695
showMenu
8796
done
8897
}
8998

90-
91-
9299
######################################## MAIN ########################################
93-
printBeginning
100+
printHeadInfo
94101
checkOsVersion 0
95102
showMenu
96103
chooseOper
97-
printEnding
104+
printFootInfo
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash -l
2+
3+
echo -e "\n>>>>>>>>> install springboot"
4+
5+
sdk version
6+
execode=$?
7+
if [ "${execode}" != "0" ]; then
8+
echo "请先安装 sdkman"
9+
exit 1
10+
fi
11+
12+
sdk install springboot
13+
spring --version

0 commit comments

Comments
 (0)