diff options
author | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2019-06-29 07:11:06 +0000 |
---|---|---|
committer | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2019-06-29 07:11:06 +0000 |
commit | 4f66e2adc38a12da3d8dd345013075e9cd76077a (patch) | |
tree | eacc5ee92e5b1e9a6c8593967cf66bb6e6e4b445 | |
parent | 64a977d2eaa461b3ec583dc6dab9cf38f55ce377 (diff) | |
download | cpt-4f66e2adc38a12da3d8dd345013075e9cd76077a.tar.gz |
kiss-new: Added more checks to the linter.
FossilOrigin-Name: 61129d32ae76ccfe98ee50e408a535905eb5442a7cb1cee5e88bc63ffbcfe3be
-rwxr-xr-x | kiss-new | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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() { |