Hi, Please review attached patch.
- simplify setup of $file variable - $check variable not used, remove it - add support for $FETCH_CMD variable, fallback to ftp(1) - some ports have distfiles, `exit 0' if that's the case - some style changes -- best regards q#
--- fetch-all Mon Nov 24 18:07:23 2008 +++ fetch-all-new Tue Jan 13 23:20:45 2009 @@ -32,19 +32,28 @@ exit 0 fi -file=`echo $1|sed -e "s,^${DIST_SUBDIR:-.}/,,"` +file=`basename $1` dir=`dirname $1` -check=`basename $1` mkdir -p $dir oldd=$PWD + cd $dir + for site in ${SITES} do - if ftp ${site}$file + if ${FETCH_CMD:-ftp} ${site}$file then echo -n "$site: " cd $oldd - if echo "${CHECK}" |cksum -c; then + + if [ -z "${CHECK}" ] + then + echo "$file: NO CHECKSUM" + exit 0 + fi + + if echo "${CHECK}" | cksum -c + then exit 0 else cd $dir