kiss-outdated: check multiple repositories in one call

This commit is contained in:
Dylan Araps 2021-07-18 08:37:01 +03:00
parent e65148db9f
commit 7b996b9c06
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C
1 changed files with 14 additions and 11 deletions

View File

@ -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