From 7b996b9c063e1f25e19ce29be27f37e7cea8709f Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 18 Jul 2021 08:37:01 +0300 Subject: [PATCH] kiss-outdated: check multiple repositories in one call --- contrib/kiss-outdated | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/contrib/kiss-outdated b/contrib/kiss-outdated index f2b52c3..045c813 100755 --- a/contrib/kiss-outdated +++ b/contrib/kiss-outdated @@ -230,16 +230,6 @@ repology_name() { } main() { - [ "$1" ] || { - printf 'usage: kiss outdated /path/to/repo\n' >&2 - exit 1 - } - - cd "$1" 2>/dev/null || { - printf 'repository %s is inaccessible\n' "$1" >&2 - exit 1 - } - printf '\n[Checking repology.org for outdated packages in %s]\n\n' "$1" >&2 for pkg in */; do @@ -282,4 +272,17 @@ main() { done } -main "$@" +for repo do + [ "$repo" ] || { + printf 'usage: kiss outdated /path/to/repo\n' >&2 + exit 1 + } + + cd "$repo" 2>/dev/null || { + printf 'repository %s is inaccessible\n' "$repo" >&2 + exit 1 + } + + main "$repo" + cd "$OLDPWD" +done