From 44702c565487841ff5bbea2f995ac723c980ba72 Mon Sep 17 00:00:00 2001 From: zhoushx1018 Date: Mon, 29 Apr 2024 16:45:05 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E6=9B=B4=E6=96=B0=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shell/batch_process.sh | 38 +++++++++++++++++++ shell/cleanLogFile.sh | 21 +++++++++++ shell/dispatch_release.sh | 79 ++++++++++++++++++++++++++++----------- 3 files changed, 117 insertions(+), 21 deletions(-) create mode 100644 shell/batch_process.sh create mode 100644 shell/cleanLogFile.sh diff --git a/shell/batch_process.sh b/shell/batch_process.sh new file mode 100644 index 0000000..3219373 --- /dev/null +++ b/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 diff --git a/shell/cleanLogFile.sh b/shell/cleanLogFile.sh new file mode 100644 index 0000000..9b8b12a --- /dev/null +++ b/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 \ No newline at end of file diff --git a/shell/dispatch_release.sh b/shell/dispatch_release.sh index 4f6b496..459030d 100644 --- a/shell/dispatch_release.sh +++ b/shell/dispatch_release.sh @@ -4,39 +4,76 @@ dispatch_branch="release" #dispatch_version="v1.1.1" dispatch_version=$1 -dir_from="/mnt/d/mt4-multi/ic_mql4_source_01" +dir_from="/mnt/c/mt4-multi/exec" 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 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 echo ========================================= 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} echo ========================================= 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" - - echo "-------" - echo " after..." - ls -l ${directory}/Experts - echo "--------------------------" -done + cp ${dispatch_exec} ${directory}/Experts + #find ${directory}/ -name "*.log" + echo "-------" + echo " after..." + ls -l ${directory}/Experts + echo "--------------------------" +done \ No newline at end of file