aboutsummaryrefslogtreecommitdiff
path: root/kiss-new
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2019-06-29 07:11:06 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2019-06-29 07:11:06 +0000
commit4f66e2adc38a12da3d8dd345013075e9cd76077a (patch)
treeeacc5ee92e5b1e9a6c8593967cf66bb6e6e4b445 /kiss-new
parent64a977d2eaa461b3ec583dc6dab9cf38f55ce377 (diff)
downloadcpt-4f66e2adc38a12da3d8dd345013075e9cd76077a.tar.gz
kiss-new: Added more checks to the linter.
FossilOrigin-Name: 61129d32ae76ccfe98ee50e408a535905eb5442a7cb1cee5e88bc63ffbcfe3be
Diffstat (limited to 'kiss-new')
-rwxr-xr-xkiss-new13
1 files 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() {