mkbuild

mk based build system
git clone git://git.2f30.org/mkbuild
Log | Files | Refs | LICENSE

commit 47e33cbd7875cb121b244468753d46b8d953feb4
parent 470fd2452728dba96de2eac306e57663b2d21959
Author: sin <sin@2f30.org>
Date:   Thu, 22 May 2014 16:00:10 +0100

Handle single URLs correctly as well

Diffstat:
Mmk.fetch | 12+++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/mk.fetch b/mk.fetch @@ -11,18 +11,24 @@ fetch-git:QV: fetch-http:QV: if test x"$url" != x""; then for u in $url; do + ok=1 if test x"$pkgsrc" = x""; then pkgsrc=`basename $u` fi t=$(cat checksums | $SUM -c && echo ok || echo fail) if test "$(echo $t | grep ok)" = ""; then rm -f "$pkgsrc" - wget -c "$u" -O "$pkgsrc" || rm -f "$pkgsrc" + wget -c "$u" -O "$pkgsrc" || { + rm -f "$pkgsrc" + ok=0 + } fi if test -e "$pkgsrc"; then tar -xf "$pkgsrc" - else - echo "Package fetching failed" fi done + if test "$ok" -eq 0; then + echo "Package fetching failed" 1>&2 + false + fi fi