From 7f2c930088fb327ba79222b265963ea7d441e4e7 Mon Sep 17 00:00:00 2001 From: espie Date: Tue, 19 Dec 2000 15:10:37 +0000 Subject: [PATCH] Handle cases like lgrind --- infrastructure/fetch/fetch-all | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/infrastructure/fetch/fetch-all b/infrastructure/fetch/fetch-all index 820fc9100ea..64c68c6a3ca 100755 --- a/infrastructure/fetch/fetch-all +++ b/infrastructure/fetch/fetch-all @@ -2,7 +2,7 @@ # Sample script to use with fetch-makefile: fetch all distfiles -# $OpenBSD: fetch-all,v 1.2 2000/03/27 02:16:48 espie Exp $ +# $OpenBSD: fetch-all,v 1.3 2000/12/19 15:10:37 espie Exp $ # # Copyright (c) 2000 Marc Espie. # @@ -26,21 +26,23 @@ # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +file=`echo $1|sed -e "s,^${DIST_SUBDIR:-.}/,,"` dir=`dirname $1` -file=`basename $1` +check=`basename $1` mkdir -p $dir cd $dir for site in ${SITES} do if ftp ${site}$file then - case `${CIPHER} <$file` in + case `${CIPHER} <$check` in ${CKSUM}) echo "Fetch, ok: $@" exit 0;; *) echo "Fetch, bad checksum: $@ on ${site}" - rm -f $file;; + rm -f $1;; esac fi done