puke: cleanup

This commit is contained in:
Dylan Araps 2019-05-14 23:27:19 +03:00
parent 042954096e
commit e47bd72a5b

5
puke
View File

@ -156,9 +156,8 @@ pkg_list() {
[ "$1" ] && { [ -d "$sys_dir/$dbs_dir/$1" ]; return "$?"; }
for item in "$sys_dir/$dbs_dir/"*; do
[ -d "$item" ] || continue
read -r version release < "$item/version"
printf '%s\n' "${item##*/} $version-$release"
read -r version release 2>/dev/null < "$item/version" &&
printf '%s\n' "${item##*/} $version-$release"
done
}