aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-03-15 22:19:06 -0400
committerB. Watson <urchlay@slackware.uk>2024-03-15 22:19:06 -0400
commit33e38a1385b14298fc926c2431288ec79caf1cb7 (patch)
treeb68ce541d8e1c87f3e951a9c6733326b68eb9105
parent10995805d8d8b4559521ac748c65031cf766f5e8 (diff)
downloadelvi-impersonators-33e38a1385b14298fc926c2431288ec79caf1cb7.tar.gz
repology: add -o (outdated) option.
-rwxr-xr-xrepology15
1 files changed, 12 insertions, 3 deletions
diff --git a/repology b/repology
index 9d34172..c24f6da 100755
--- a/repology
+++ b/repology
@@ -5,6 +5,8 @@
# Author: B. Watson (yalhcru at gmail)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# https://repology.org//projects/?maintainer=urchlay@slackware.uk&inrepo=slackbuilds&outdated=1
+
. surfraw || exit 1
w3_usage_hook() {
@@ -15,6 +17,7 @@ Description:
Local options:
-p,-pkg,-package Search package names
-m,-maint Search maintainers by email address
+ -o,-outdated Search for outdated packages, by email address
By default, if there's an @ in the search term, a maintainer search is done,
otherwise a package search.
EOF
@@ -25,8 +28,9 @@ w3_parse_option_hook() {
opt="$1"
optarg="$2"
case "$opt" in
- -p|-pkg|-pac*) repo_target="/projects/" ;;
- -m|-main*) repo_target="/maintainers/" ;;
+ -p|-pkg|-pac*) repo_target="/projects/" ;;
+ -m|-main*) repo_target="/maintainers/" ;;
+ -o|-outdated*) repo_target="/projects/" ; O=1 ;;
*) return 1 ;;
esac
return 0
@@ -40,5 +44,10 @@ w3_parse_args "$@"
*) repo_target="/projects/" ;;
esac
-url="https://repology.org/${repo_target}?search=$( w3_url_of_arg $w3_args )";
+if [ "$O" = "1" ]; then
+ [ "$w3_args" = "" ] && w3_args="urchlay@slackware.uk"
+ url="https://repology.org/${repo_target}?maintainer=$( w3_url_of_arg $w3_args )&outdated=1";
+else
+ url="https://repology.org/${repo_target}?search=$( w3_url_of_arg $w3_args )";
+fi
w3_browse_url "$url"