Browse Source

update: 更新脚本

master release/v1.6.1
zhoushx1018 8 months ago
parent
commit
44702c5654
  1. 38
      shell/batch_process.sh
  2. 21
      shell/cleanLogFile.sh
  3. 77
      shell/dispatch_release.sh

38
shell/batch_process.sh

@ -0,0 +1,38 @@
#!/bin/bash
dirs_to=(
"/mnt/c/mt4-multi/demo--ic--00"
"/mnt/c/mt4-multi/demo--ic--01"
"/mnt/c/mt4-multi/demo--ic--02"
"/mnt/c/mt4-multi/pro--exness--01"
"/mnt/c/mt4-multi/pro--exness--02"
"/mnt/c/mt4-multi/pro--exness--03"
"/mnt/c/mt4-multi/pro--exness--04"
"/mnt/c/mt4-multi/pro--exness--05"
"/mnt/c/mt4-multi/pro--ic--06"
"/mnt/c/mt4-multi/pro--exness--07"
"/mnt/c/mt4-multi/pro--exness--08"
"/mnt/c/mt4-multi/pro--ic--10"
"/mnt/c/mt4-multi/pro--ic--11"
"/mnt/c/mt4-multi/pro--ic--12"
"/mnt/c/mt4-multi/pro--ic--13"
)
# 判断参数个数是否小于 1
if [ "$#" -lt 0 ]; then
echo "usage: ${0} ..."
echo " ${0} ..."
echo " ${0} ..."
echo " ..."
exit 1
fi
echo =========================================
for directory in ${dirs_to[@]}; do
echo "-----------${directory}---------------"
du -sh ${directory}/*
echo "--------------------------"
done

21
shell/cleanLogFile.sh

@ -0,0 +1,21 @@
#!/bin/bash
# 判断参数个数是否小于 1
if [ "$#" -lt 1 ]; then
echo "usage: ${0} logFileName"
echo " ${0} 20231227.log"
echo " ${0} 20231230.log"
echo " ..."
exit 1
fi
while true; do
echo "clean file ..."
ls -lrth
: > ./$1
ls -lrth
echo "clean ok, sleep ..."
sleep 50
done

77
shell/dispatch_release.sh

@ -4,39 +4,76 @@ dispatch_branch="release"
#dispatch_version="v1.1.1" #dispatch_version="v1.1.1"
dispatch_version=$1 dispatch_version=$1
dir_from="/mnt/d/mt4-multi/ic_mql4_source_01"
dir_from="/mnt/c/mt4-multi/exec"
dirs_to=( dirs_to=(
"/mnt/d/mt4-multi/ic_mql4_source_02"
"/mnt/d/mt4-multi/exness_mql4_source_00"
)
"/mnt/c/mt4-multi/demo--ic--01"
"/mnt/c/mt4-multi/demo--ic--02"
"/mnt/c/mt4-multi/demo--ic--02--01"
"/mnt/c/mt4-multi/demo--ic--02--02"
"/mnt/c/mt4-multi/demo--ic--02--03"
"/mnt/c/mt4-multi/demo--ic--03"
"/mnt/c/mt4-multi/demo--ic--04"
"/mnt/c/mt4-multi/demo--ic--05"
"/mnt/c/mt4-multi/demo--ic--06"
"/mnt/c/mt4-multi/demo--ic--07"
"/mnt/c/mt4-multi/demo--ic--08"
"/mnt/c/mt4-multi/demo--ic--09"
"/mnt/c/mt4-multi/demo--ic--10"
"/mnt/c/mt4-multi/demo--ic--11"
"/mnt/c/mt4-multi/demo--ic--12"
"/mnt/c/mt4-multi/demo--ic--13"
"/mnt/c/mt4-multi/demo--ic--14"
"/mnt/c/mt4-multi/demo--ic--15"
"/mnt/c/mt4-multi/demo--ic--16"
"/mnt/c/mt4-multi/demo--ic--17"
"/mnt/c/mt4-multi/demo--ic--18"
"/mnt/c/mt4-multi/demo--ic--19"
"/mnt/c/mt4-multi/pro--exness--01"
"/mnt/c/mt4-multi/pro--exness--02"
"/mnt/c/mt4-multi/pro--exness--03"
"/mnt/c/mt4-multi/pro--exness--04"
"/mnt/c/mt4-multi/pro--exness--05"
"/mnt/c/mt4-multi/pro--ic--06"
"/mnt/c/mt4-multi/pro--exness--07"
"/mnt/c/mt4-multi/pro--exness--08"
"/mnt/c/mt4-multi/pro--ic--09"
"/mnt/c/mt4-multi/pro--ic--10"
"/mnt/c/mt4-multi/pro--ic--11"
"/mnt/c/mt4-multi/pro--ic--12"
"/mnt/c/mt4-multi/pro--ic--13"
"/mnt/c/mt4-multi/pro--ic--14"
"/mnt/c/mt4-multi/pro--ic--15"
"/mnt/c/mt4-multi/pro--exness--16"
"/mnt/c/mt4-multi/pro--exness--17"
"/mnt/c/mt4-multi/pro--ic--18"
)
# 判断参数个数是否小于 1 # 判断参数个数是否小于 1
if [ "$#" -lt 1 ]; then if [ "$#" -lt 1 ]; then
echo "usage: ${0} version"
echo " ${0} v1.1.0"
echo " ${0} v1.2.0"
echo " ..."
exit 1
echo "usage: ${0} version"
echo " ${0} v1.1.0"
echo " ${0} v1.2.0"
echo " ..."
exit 1
fi fi
echo ========================================= echo =========================================
echo md5sum release file echo md5sum release file
dispatch_exec="${dir_from}/Experts/smt_${dispatch_branch}_${dispatch_version}.ex4"
dispatch_exec="${dir_from}/smt_${dispatch_branch}_${dispatch_version}.ex4"
md5sum ${dispatch_exec} md5sum ${dispatch_exec}
echo ========================================= echo =========================================
for directory in ${dirs_to[@]}; do for directory in ${dirs_to[@]}; do
echo "-----------${directory}---------------"
echo " before..."
ls -l ${directory}/Experts
echo "-----------${directory}---------------"
echo " before..."
ls -l ${directory}/Experts
cp ${dispatch_exec} ${directory}/Experts
#find ${directory}/ -name "*.log"
cp ${dispatch_exec} ${directory}/Experts
#find ${directory}/ -name "*.log"
echo "-------"
echo " after..."
ls -l ${directory}/Experts
echo "--------------------------"
echo "-------"
echo " after..."
ls -l ${directory}/Experts
echo "--------------------------"
done done
Loading…
Cancel
Save