diff --git a/update_task.sh b/update_task.sh index c5283fad..e6eef5e2 100644 --- a/update_task.sh +++ b/update_task.sh @@ -31,7 +31,7 @@ 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|$|\",|}' >> $FileQx + grep -E "https://raw\.githubusercontent\.com.+tag.+enabled" $file | perl -pe '{s|^| \"|; s|(.+)|\1\",|}' >> $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 @@ -40,4 +40,4 @@ do done echo -e " ]\n}" >> $FileQx perl -0777 -i -pe "s|,(\n \])|\1|" $FileQx - +perl -0777 -i -pe "s|# .+\n{2}(# .+)|\1|g" $FileLoon