修复centos -x兼容性

This commit is contained in:
whyour
2021-11-07 21:53:16 +08:00
parent 62596f27ef
commit bd6d711212
6 changed files with 43 additions and 43 deletions
+2 -2
View File
@@ -39,7 +39,7 @@ gen_array_scripts() {
local i="-1"
cd $dir_scripts
for file in $(ls); do
if [ -f $file ] && [[ $file == *.js && $file != sendNotify.js ]]; then
if [[ -f $file ]] && [[ $file == *.js && $file != sendNotify.js ]]; then
let i++
array_scripts[i]=$(echo "$file" | perl -pe "s|$dir_scripts/||g")
array_scripts_name[i]=$(grep "new Env" $file | awk -F "'|\"" '{print $2}' | head -1)
@@ -170,7 +170,7 @@ run_concurrent() {
for i in "${!array[@]}"; do
single_log_path="$log_dir/${single_log_time}_$((i + 1)).log"
eval cat $single_log_path $cmd
[ -f $single_log_path ] && rm -f $single_log_path
[[ -f $single_log_path ]] && rm -f $single_log_path
done
eval . $file_task_after "$@" $cmd