Skip to content

Instantly share code, notes, and snippets.

@diaolizhi diaolizhi/reload.sh
Last active Jan 13, 2019

Embed
What would you like to do?
Linux git 同步 maven 编译 java -jar 执行
# 项目名
PRONAME="demo"
#echo $PRONAME
# 项目所在路径
PROPATH='/root/tieba-demo/Tieba/'
nohup git pull origin master >/dev/null 2>&1
#git pull origin master
cd $PROPATH
nohup mvn install -DskipTests >/dev/null 2>&1
#mvn install -DskipTests
cd target
FILENAME=`ls -tr $PRONAME*.jar | tail -n 1`
#echo $FILENAME
pkill -f "java -jar $PRONAME"
#ps -ef | grep java
nohup java -jar $FILENAME >/dev/null 2>log.txt &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.