strom/fish-misc
Archived
1
0
Fork 0
This repository has been archived on 2023-08-27. You can view files and clone it, but cannot push or open issues or pull requests.
fish-misc/functions/chkpkg.fish

20 lines
485 B
Fish

# vi:set ft=fish ts=4 sw=4 noet ai:
function chkpkg --description "check for new fedora packages"
if not command -sq koji
return
end
function _isnum
test (math "0+$argv[1]" 2>/dev/null)
end
set -l days 2
set -l packages $argv
if _isnum $argv[1]
set days $argv[1]
set packages $argv[2..-1]
end
for package in $packages
echo "Checking package: $package"
koji list-builds --state=COMPLETE --after=(env LC_ALL=C date -d '-'$days' days') --package $package;
end
end