From 88090ef2bdc34b57108e946f011de51e1a1a532f Mon Sep 17 00:00:00 2001 From: Cesar Strauss Date: Thu, 6 Nov 2008 18:05:37 -0200 Subject: [PATCH] Allow partial downloads. Downloads will be made to a 'partial' directory, and only moved to the 'source' directory when ready. --- tools/mpk-source | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/mpk-source b/tools/mpk-source index 9acefad..eb34279 100644 --- a/tools/mpk-source +++ b/tools/mpk-source @@ -48,10 +48,17 @@ do_get_source() exit 1 fi - mkdir -p $sourcedir - cd $sourcedir + mkdir -p $sourcedir/partial + cd $sourcedir/partial echo Downloading $name from $pkg_download ... wget -c $pkg_download + + if [ $? != 0 ]; then + echo >&2 "$(basename $0) source: Failed to download $name" + exit 1 + fi + + mv $sourcedir/partial/$source $sourcedir } case $1 in -- 2.11.4.GIT