kiss: fix pkg_lint

- unsquish
- use variable with pkg_find so die works.
This commit is contained in:
Dylan Araps 2021-07-02 13:15:47 +00:00
parent 6ef40ad38d
commit 3d11a77cd0
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C
1 changed files with 13 additions and 5 deletions

18
kiss
View File

@ -138,12 +138,20 @@ sh256() {
pkg_lint() {
log "$1" "Checking repository files"
cd "$(pkg_find "$1")"
read -r _ release 2>/dev/null < version || die "Version file not found"
_r=$(pkg_find "$1")
cd "$_r"
[ "$release" ] || die "$1" "Release field not found in version file"
[ -x build ] || die "$1" "Build file not found or not executable"
[ -f sources ] || war "$1" "Sources file not found"
read -r _ release 2>/dev/null < version ||
die "Version file not found"
[ "$release" ] ||
die "$1" "Release field not found in version file"
[ -x build ] ||
die "$1" "Build file not found or not executable"
[ -f sources ] ||
war "$1" "Sources file not found"
}
pkg_find() {