From 4f66e2adc38a12da3d8dd345013075e9cd76077a Mon Sep 17 00:00:00 2001 From: "dylan.araps@gmail.com" Date: Sat, 29 Jun 2019 07:11:06 +0000 Subject: kiss-new: Added more checks to the linter. FossilOrigin-Name: 61129d32ae76ccfe98ee50e408a535905eb5442a7cb1cee5e88bc63ffbcfe3be --- 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() { -- cgit v1.2.3