summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2024-01-10 20:13:33 -0500
committerbill-auger <mr.j.spam.me@gmail.com>2024-03-27 12:01:04 -0400
commit99ac0b5429e34460ca1369bbf35e4d4a13fbc6e3 (patch)
tree122fdc8e33e1844d5f9a59a760090e073e8a98f7
parent413c02708d19d5cfbcaa59d7a833d83cab0a3933 (diff)
notifications.sh: account for pkgver epoch and hyphenated repo names
-rw-r--r--src/lib/notifications.sh8
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