diff options
author | bill-auger <mr.j.spam.me@gmail.com> | 2024-01-10 20:13:33 -0500 |
---|---|---|
committer | bill-auger <mr.j.spam.me@gmail.com> | 2024-03-28 23:12:54 -0400 |
commit | 24b928d730fb7fe0c5dfd4145b560e46d7a83d7e (patch) | |
tree | 122fdc8e33e1844d5f9a59a760090e073e8a98f7 | |
parent | 1b73d8a12a4e17c65b0326ca1d04bb6b723873a2 (diff) |
notifications.sh: account for pkgver epoch and hyphenated repo names
-rw-r--r-- | src/lib/notifications.sh | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/notifications.sh b/src/lib/notifications.sh index 6a42fd9..e29d929 100644 --- a/src/lib/notifications.sh +++ b/src/lib/notifications.sh @@ -7,11 +7,9 @@ notify_pbot() # ( "ssh_cmd" ) file_list->STDIN local reject_rx='-debug-' # example "selected" $file_list entry, to be fed through $filename_rx: # libre/gst-plugins-bad-1.22.8-1.parabola1-x86_64.pkg.tar.zst - # (repo )/(pkgname )-(pkgver )- -(arch ) - local filename_rx="^([a-z]+)/([0-9A-Za-z\._@\+\-]+)-([0-9A-Za-z\._]+)-[^/-]+-([0-9a-z_]+)${select_rx}$" - # example $filename_subst, sent to pbot: - # (gst-plugins-bad 1.22.8)->libre/x86_64 - local filename_subst='(\2 \3)->\1/\4' + # (repo )/(pkgname )- : (pkgver )- -(arch ) + local filename_rx="^([a-z-]+)/([0-9A-Za-z\._@\+\-]+)-([0-9]+:)?([0-9A-Za-z\._]+)-[^/-]+-([0-9a-z_]+)${select_rx}" + local filename_subst='(\2 \4)->\1/\5' # eg: (iceweasel 121.0.1)->libre/x86_64 local filename_sed="s|${filename_rx}|${filename_subst}|" local filename local releases=( $(while read -r -d '' # process librerelease::$file_list via STDIN |