mkbuild

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

commit 470fd2452728dba96de2eac306e57663b2d21959
parent 14568c3a8c401792ab153178fef148cb74530a1b
Author: sin <sin@2f30.org>
Date:   Thu, 22 May 2014 15:32:36 +0100

Support multiple urls for mk.fetch

Diffstat:
Mmk.fetch | 28+++++++++++++++-------------
1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/mk.fetch b/mk.fetch @@ -10,17 +10,19 @@ fetch-git:QV: fetch-http:QV: if test x"$url" != x""; then - if test x"$pkgsrc" = x""; then - pkgsrc=`basename $url` - fi - t=$(cat checksums | $SUM -c && echo ok || echo fail) - if test "$(echo $t | grep ok)" = ""; then - rm -f "$pkgsrc" - wget -c "$url" -O "$pkgsrc" - fi - if test -e "$pkgsrc"; then - tar -xf "$pkgsrc" - else - echo "Package fetching failed" - fi + for u in $url; do + 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" + fi + if test -e "$pkgsrc"; then + tar -xf "$pkgsrc" + else + echo "Package fetching failed" + fi + done fi