summaryrefslogtreecommitdiff
path: root/abuild
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-02-20 09:08:26 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-02-20 09:08:26 +0000
commitec6a945d47f4cf97d98ccf6fc1781cf578667264 (patch)
tree0594dd3a79884758d579bb73f88d03c6ad5fe29b /abuild
parent2f40d9a87322175186a9a7f885c0646cebb1ef8f (diff)
downloadabuild-ec6a945d47f4cf97d98ccf6fc1781cf578667264.tar.gz
abuild-ec6a945d47f4cf97d98ccf6fc1781cf578667264.tar.bz2
abuild-ec6a945d47f4cf97d98ccf6fc1781cf578667264.tar.xz
abuild-ec6a945d47f4cf97d98ccf6fc1781cf578667264.zip
abuild: dont check md5sum if there are no sources. fix depends_has
Diffstat (limited to 'abuild')
-rwxr-xr-xabuild21
1 files changed, 15 insertions, 6 deletions
diff --git a/abuild b/abuild
index 89fadbc..7395748 100755
--- a/abuild
+++ b/abuild
@@ -78,13 +78,17 @@ sanitycheck() {
[ -z "$url" ] && die "Missing url in APKBUILD"
[ -z "$license" ] && die "Missing license in APKBULID"
- for i in $source; do
- md5sums_has ${i##*/} || die "${i##*/} is missing in md5sums"
- done
+ if [ -n "$source" ]; then
+ for i in $source; do
+ md5sums_has ${i##*/} || die "${i##*/} is missing in md5sums"
+ done
+ fi
- for i in $(echo "$md5sums" | awk '{ print $2 }'); do
- source_has $i || die "$i is missing in source"
- done
+ if [ -n "$md5sums" ]; then
+ for i in $(echo "$md5sums" | awk '{ print $2 }'); do
+ source_has $i || die "$i is missing in source"
+ done
+ fi
# common spelling errors
[ -n "$depend" ] && die "APKBUILD contains 'depend'. It should be depends"
@@ -542,6 +546,7 @@ builddeps() {
# replace the md5sums in the APKBUILD
checksum() {
local s files
+ [ -z "$source" ] && return 0
fetch
msg "Updating the md5sums in APKBUILD..."
for s in $source; do
@@ -607,6 +612,10 @@ options_has() {
list_has "$1" $options
}
+depends_has() {
+ list_has "$1" $depends
+}
+
md5sums_has() {
list_has "$1" $md5sums
}