abuild: dont check md5sum if there are no sources. fix depends_has
This commit is contained in:
parent
2f40d9a873
commit
ec6a945d47
21
abuild
21
abuild
@ -78,13 +78,17 @@ sanitycheck() {
|
|||||||
[ -z "$url" ] && die "Missing url in APKBUILD"
|
[ -z "$url" ] && die "Missing url in APKBUILD"
|
||||||
[ -z "$license" ] && die "Missing license in APKBULID"
|
[ -z "$license" ] && die "Missing license in APKBULID"
|
||||||
|
|
||||||
for i in $source; do
|
if [ -n "$source" ]; then
|
||||||
md5sums_has ${i##*/} || die "${i##*/} is missing in md5sums"
|
for i in $source; do
|
||||||
done
|
md5sums_has ${i##*/} || die "${i##*/} is missing in md5sums"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
for i in $(echo "$md5sums" | awk '{ print $2 }'); do
|
if [ -n "$md5sums" ]; then
|
||||||
source_has $i || die "$i is missing in source"
|
for i in $(echo "$md5sums" | awk '{ print $2 }'); do
|
||||||
done
|
source_has $i || die "$i is missing in source"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
# common spelling errors
|
# common spelling errors
|
||||||
[ -n "$depend" ] && die "APKBUILD contains 'depend'. It should be depends"
|
[ -n "$depend" ] && die "APKBUILD contains 'depend'. It should be depends"
|
||||||
@ -542,6 +546,7 @@ builddeps() {
|
|||||||
# replace the md5sums in the APKBUILD
|
# replace the md5sums in the APKBUILD
|
||||||
checksum() {
|
checksum() {
|
||||||
local s files
|
local s files
|
||||||
|
[ -z "$source" ] && return 0
|
||||||
fetch
|
fetch
|
||||||
msg "Updating the md5sums in APKBUILD..."
|
msg "Updating the md5sums in APKBUILD..."
|
||||||
for s in $source; do
|
for s in $source; do
|
||||||
@ -607,6 +612,10 @@ options_has() {
|
|||||||
list_has "$1" $options
|
list_has "$1" $options
|
||||||
}
|
}
|
||||||
|
|
||||||
|
depends_has() {
|
||||||
|
list_has "$1" $depends
|
||||||
|
}
|
||||||
|
|
||||||
md5sums_has() {
|
md5sums_has() {
|
||||||
list_has "$1" $md5sums
|
list_has "$1" $md5sums
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user