1. QX Rewrite清单带上注释;2. QX Task 尝试修复多换行符的问题。

This commit is contained in:
EvineDeng
2021-01-21 14:52:40 +08:00
parent 501d8246ed
commit 5bc1d13add

View File

@ -31,11 +31,12 @@ do
if [[ -n $TaskName ]]; then
echo -e "\n# $TaskName" >> $FileLoon
grep -E "cron.+script-path.+https://raw\.githubusercontent\.com.+tag" $file >> $FileLoon
grep -E "https://raw\.githubusercontent\.com.+tag.+enabled" $file | perl -pe '{s|^| \"|; s|(.+)|\1\",|}' >> $FileQx
grep -E "https://raw\.githubusercontent\.com.+tag.+enabled" $file | perl -pe '{s|(.+)|\1\",|; s|^| \"|}' >> $FileQx
grep -E "type.+cronexp.+script-path.+https://raw\.githubusercontent\.com" $file >> $FileSurge
fi
grep -E "http-(request|response).+script-path.+https://raw\.githubusercontent\.com.+tag" $file | perl -pe "s|(.+tag=)(.+)|\n# \2\n\1\2|">> $FileLoon
grep -E "script-(request|response)-.+https://raw\.githubusercontent\.com" $file | perl -pe "s|(.+)|\n# \n\1|" >> $FileQxRe
grep -E "script-(request|response)-.+https://raw\.githubusercontent\.com" $file | perl -pe "s|(.+)|\n# $TaskName\n\1|" >> $FileQxRe
tmp=$(grep -E "script-(request|response)-.+https://raw\.githubusercontent\.com" $file)
grep -E "type=http-(request|response).+pattern.+script-path.+https://raw\.githubusercontent\.com" $file >> $FileSurge
done
echo -e " ]\n}" >> $FileQx