Author: jfrederic.clere(a)jboss.com
Date: 2009-11-24 04:52:26 -0500 (Tue, 24 Nov 2009)
New Revision: 2592
Modified:
trunk/build/unix/util/ckeckdownload.sh
Log:
Arrange the timeout value (0 means retry forever!!!).
Modified: trunk/build/unix/util/ckeckdownload.sh
===================================================================
--- trunk/build/unix/util/ckeckdownload.sh 2009-11-23 17:34:54 UTC (rev 2591)
+++ trunk/build/unix/util/ckeckdownload.sh 2009-11-24 09:52:26 UTC (rev 2592)
@@ -32,10 +32,14 @@
if [ -z $URLBACK ]; then
URLBACK=$URL
fi
- wget --tries=0 --retry-connrefused $URL
+ wget --tries=3 --retry-connrefused $URL
if [ $? -ne 0 ]; then
echo "downloadtaredsrc Retrying on $URLBACK"
- wget --tries=0 --retry-connrefused $URLBACK
+ wget --tries=3 --retry-connrefused $URLBACK
+ if [ $? -ne 0 ]; then
+ echo "downloadtaredsrc $URLBACK failed"
+ return 1
+ fi
fi
fname=`basename $URL`
case ${fname} in
@@ -47,6 +51,7 @@
;;
esac
rm -f $fname
+ return 0
}
# Apply patch for the component
@@ -74,6 +79,9 @@
cd $build_cache_dir
if [ ! -d ${src_dir} ]; then
downloadtaredsrc $src_url $src_url_back
+ if [ $? -ne 0 ]; then
+ return 1
+ fi
applypatch $src_dir
fi
cp -rp ${src_dir} ${package_src_dir}/srclib
@@ -99,3 +107,8 @@
# Call the internal functions.
ckeckdownload $src_dir $url $urlback
+if [ $? -ne 0 ]; then
+ echo "ckeckdownload src_dir: $src_dir url: $url urlback: $urlback FAILED!"
+ exit 1
+fi
+exit 0
Show replies by date