aboutsummaryrefslogtreecommitdiff
path: root/kiss
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2019-09-09 08:05:11 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2019-09-09 08:05:11 +0000
commit4c7227d548f5e447d41e7714547981f1477a4eea (patch)
tree534d098a51c931f47aadb54fc4f435b9d928470c /kiss
parent8ec69666cf7017c25bdf0be8cd62c81067f5af3f (diff)
downloadcpt-4c7227d548f5e447d41e7714547981f1477a4eea.tar.gz
kiss: clean up
FossilOrigin-Name: 99888dc632d56c265a75b34df445e1a444f79b6a24551329f3043372b8f4d3aa
Diffstat (limited to 'kiss')
-rwxr-xr-xkiss7
1 files changed, 3 insertions, 4 deletions
diff --git a/kiss b/kiss
index 6574b8a..776d826 100755
--- a/kiss
+++ b/kiss
@@ -98,15 +98,14 @@ pkg_list() {
# Loop over each version file and warn if one doesn't exist.
# Also warn if a package is missing its version file.
for pkg; do
- [ -d "$pkg" ] || {
+ if [ ! -d "$pkg" ]; then
log "Package '$pkg' is not installed"
return 1
- }
- [ -f "$pkg/version" ] || {
+ elif [ ! -f "$pkg/version" ]; then
log "[$pkg] Warning, package has no version file"
continue
- }
+ fi
read -r version release < "$pkg/version" &&
printf '%s\n' "$pkg $version-$release"