50 lines
1.4 KiB
Bash
50 lines
1.4 KiB
Bash
#!/bin/bash
|
|
. /etc/profile
|
|
#########################################################################
|
|
# File Name: jl_gm_update.sh
|
|
# Created on: 2019-09-04 10:54:43
|
|
# Author: Wu Kang
|
|
# Last Modified: 2022-07-13 16:48:25
|
|
# Description:
|
|
#########################################################################
|
|
BASE_DIR="/data/update/project/miduo_gm"
|
|
|
|
#表文件地址,不同渠道用表不一样
|
|
table=$1
|
|
TABLE_DIR="/data/update/project/${table}"
|
|
if [ -z ${table} ]; then
|
|
TABLE_DIR=$BASE_DIR
|
|
echo -e "默认使用gm打表路径 $TABLE_DIR"
|
|
fi
|
|
|
|
#excel
|
|
cd ${TABLE_DIR}/data_excel/ || exit
|
|
svn up
|
|
cd ${TABLE_DIR}/execl_to_txt/ || exit
|
|
java -Dfile.encoding=UTF-8 -Djava.ext.dirs=./lib ExcelUtils
|
|
|
|
#java
|
|
cd ${BASE_DIR}/ || exit
|
|
git pull
|
|
|
|
mvn clean package
|
|
|
|
#删除旧文件
|
|
rm -rf ${BASE_DIR}/gm/*
|
|
|
|
#创建新目录文件
|
|
json_dir=${BASE_DIR}/gm/config/jsonconf
|
|
mkdir -p ${json_dir}
|
|
|
|
#复制文件
|
|
cp -f ${TABLE_DIR}/miduo_server/conf/server/ItemConfig.txt ${json_dir}/ItemConfig.txt
|
|
cp -f ${TABLE_DIR}/miduo_server/conf/server/RechargeCommodityConfig.txt ${json_dir}/RechargeCommodityConfig.txt
|
|
cp -f ${BASE_DIR}/conf/jsonconf/Reason.txt ${json_dir}/Reason.txt
|
|
cp -f ${BASE_DIR}/target/gm_tw_admin-1.0-SNAPSHOT.jar ${BASE_DIR}/gm/gm_tw_admin-1.0-SNAPSHOT.jar
|
|
cp -rf ${BASE_DIR}/conf/script ${BASE_DIR}/gm/config
|
|
mv ${BASE_DIR}/gm/config/script/gm_reboot.sh ${BASE_DIR}/gm/gm_reboot.sh
|
|
|
|
#打包
|
|
cd ${BASE_DIR}/gm || exit
|
|
tar -czvf gm.tar.gz ./*
|