diff options
Diffstat (limited to 'src/lib/blacklist.sh')
-rwxr-xr-x | src/lib/blacklist.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/lib/blacklist.sh b/src/lib/blacklist.sh index 10eafef..e3d976b 100755 --- a/src/lib/blacklist.sh +++ b/src/lib/blacklist.sh @@ -96,6 +96,21 @@ blacklist-get-rep() { blacklist-normalize | cut -d: -f2 } +# Usage: blacklist-cat | blacklist-get-url +# Prints URLs formed from the reference-id fields of the blacklist line(s) on stdin. +# Prints an empty line in the absence of reference. +blacklist-get-url() { + blacklist-normalize | awk -F: ' + BEGIN { + refs["debian"] = "http://bugs.debian.org/" + refs["fsf"] = "http://libreplanet.org/wiki/List_of_software_that_does_not_respect_the_Free_System_Distribution_Guidelines#" + refs["sv"] = "https://savannah.nongnu.org/bugs/?" + refs["fedora"] = "https://bugzilla.redhat.com/show_bug.cgi?id=" + refs["parabola"] = "https://labs.parabola.nu/issues/" + } + refs[$3] { print refs[$3] $4 } !refs[$3] { print "" }' +} + # Usage: blacklist-cat | blacklist-get-reason # Prints only the reason field of the blacklist line(s) on stdin. blacklist-get-reason() { |