diff options
| author | Ahmed <git@gumx.cc> | 2026-06-01 22:33:53 +0300 |
|---|---|---|
| committer | Ahmed <git@gumx.cc> | 2026-06-01 22:33:53 +0300 |
| commit | d3ce5022d76b0784486593f023f1c0dd20f8ec93 (patch) | |
| tree | c979bcf80951b15ba18f299d18cba9af876d1339 /build.sh | |
| parent | ae72b8f9976a1c0cca66ff4cb31eadf311c677e7 (diff) | |
fix: grep interoperability
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -631,9 +631,9 @@ RSSHEAD sort -r "${list_file}" | head -n 20 | while IFS= read -r line; do # Line format: - [DATE] [TITLE](URL) local date title url - date="$(echo "${line}" | grep -oP '\[\K[0-9]{4}-[0-9]{2}-[0-9]{2}(?=\])')" - title="$(echo "${line}" | grep -oP '\]\s+\[\K[^\]]+(?=\]\()')" - url="$(echo "${line}" | grep -oP '\]\(\K[^)]+(?=\))')" + date="$(echo "${line}" | sed -n 's/.*\[\([0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}\)\].*/\1/p')" + title="$(echo "${line}" | sed -n 's/.*\] \[\([^]]*\)\](.*/\1/p')" + url="$(echo "${line}" | sed -n 's/.*\](\([^)]*\)).*/\1/p')" [[ -z "${date}" || -z "${title}" || -z "${url}" ]] && continue # RFC 2822 date from YYYY-MM-DD |
