From 2698a51f5e4c7ec977c67bac8078ecbfe3e341c6 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 29 Jun 2019 10:11:07 +0300 Subject: [PATCH] kiss-new: Added more checks to the linter. --- kiss-new | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/kiss-new b/kiss-new index 1fe6de0..f229c0c 100755 --- a/kiss-new +++ b/kiss-new @@ -43,8 +43,17 @@ pkg_lint() { [ -f sources ] || die "Sources file not found." [ -x build ] || die "Build file not found or not executable." - [ -f licenses ] || die "License file not found or empty." - [ -f version ] || die "Version file not found or empty." + [ -s licenses ] || die "License file not found or empty." + [ -s version ] || die "Version file not found or empty." + + # Ensure that the release field in the version file is set + # to something. + read -r _ rel < version + [ "$rel" ] || die "Release field not found in version file." + + # Unset this variable so it isn't used again on a failed + # source. There's no 'local' keyword in POSIX sh. + rel= } pkg_search() {