pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/fetch Add support for fetching from URLs that do no...
details: https://anonhg.NetBSD.org/pkgsrc/rev/702d3bfeed88
branches: trunk
changeset: 396735:702d3bfeed88
user: joerg <joerg%pkgsrc.org@localhost>
date: Sun Aug 02 02:38:52 2009 +0000
description:
Add support for fetching from URLs that do not end in the distfile.
If the URL is prefixed with a dash, it is considered complete.
diffstat:
mk/fetch/fetch | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diffs (34 lines):
diff -r e9be077f6120 -r 702d3bfeed88 mk/fetch/fetch
--- a/mk/fetch/fetch Sun Aug 02 00:38:35 2009 +0000
+++ b/mk/fetch/fetch Sun Aug 02 02:38:52 2009 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: fetch,v 1.13 2009/07/20 09:09:02 tnn Exp $
+# $NetBSD: fetch,v 1.14 2009/08/02 02:38:52 joerg Exp $
#
# Copyright (c) 2006 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -267,12 +267,20 @@
#
while ${TEST} $# -gt 0; do
site="$1"; shift
+ case "$site" in
+ -*)
+ url=${site#-}
+ ;;
+ *)
+ url=$site$file
+ ;;
+ esac
( cd $fetchdir
if ${TEST} -n "$resume"; then
- fetch_cmd="${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${FETCH_RESUME_ARGS} ${FETCH_OUTPUT_ARGS} $outputfile $site$file"
+ fetch_cmd="${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${FETCH_RESUME_ARGS} ${FETCH_OUTPUT_ARGS} $outputfile $url"
else
- fetch_cmd="${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${FETCH_OUTPUT_ARGS} $outputfile $site$file ${FETCH_AFTER_ARGS}"
+ fetch_cmd="${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${FETCH_OUTPUT_ARGS} $outputfile $url ${FETCH_AFTER_ARGS}"
fi
${TEST} -z "$verbose" || ${ECHO} "$fetch_cmd"
$fetch_cmd )
Home |
Main Index |
Thread Index |
Old Index