diff options
author | asau <asau@pkgsrc.org> | 2016-08-09 15:16:35 +0000 |
---|---|---|
committer | asau <asau@pkgsrc.org> | 2016-08-09 15:16:35 +0000 |
commit | 952cfb675dbebd9fb3f285522d6c5bfa373f7a6b (patch) | |
tree | 06254a01c1b01a27ccc91e573f033b643a41bdaf /mk | |
parent | d8f6b572fb374f2a205849b34baa76e49b1eb285 (diff) | |
download | pkgsrc-952cfb675dbebd9fb3f285522d6c5bfa373f7a6b.tar.gz |
Handle special case of URLs prepended with dash.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/fetch/fetch-list.mk | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/mk/fetch/fetch-list.mk b/mk/fetch/fetch-list.mk index 58d5b68b2b6..9cddf8f06fa 100644 --- a/mk/fetch/fetch-list.mk +++ b/mk/fetch/fetch-list.mk @@ -1,4 +1,4 @@ -# $NetBSD: fetch-list.mk,v 1.14 2011/06/19 10:23:56 plunky Exp $ +# $NetBSD: fetch-list.mk,v 1.15 2016/08/09 15:16:35 asau Exp $ ###################################################################### ### fetch-list (PUBLIC) @@ -82,8 +82,16 @@ fetch-list-one-pkg: ${ECHO} "${MKDIR} ${_DISTDIR}"; \ ${ECHO} 'cd ${_DISTDIR} && { [ -f ${fetchfile} -o -f ${fetchfile:T} ] ||'; \ ${ECHO} 'for site in $$sites; do'; \ - ${ECHO} ' ${_FETCH_CMD.${FETCH_USING}} ${_FETCH_BEFORE_ARGS.${FETCH_USING}} ${_FETCH_OUTPUT_ARGS.${FETCH_USING}} ${fetchfile:T} "$${site}${fetchfile:T}" ${_FETCH_AFTER_ARGS.${FETCH_USING}} && break ||'; \ - ${ECHO} ' ${ECHO} ${fetchfile:T} not fetched'; \ + ${ECHO} ' case "$${site}" in'; \ + ${ECHO} ' -*)'; \ + ${ECHO} ' ${_FETCH_CMD.${FETCH_USING}} ${_FETCH_BEFORE_ARGS.${FETCH_USING}} ${_FETCH_OUTPUT_ARGS.${FETCH_USING}} ${fetchfile:T} "$${site#-}" ${_FETCH_AFTER_ARGS.${FETCH_USING}} && break ||'; \ + ${ECHO} ' ${ECHO} ${fetchfile:T} not fetched'; \ + ${ECHO} ' ;;'; \ + ${ECHO} ' *)'; \ + ${ECHO} ' ${_FETCH_CMD.${FETCH_USING}} ${_FETCH_BEFORE_ARGS.${FETCH_USING}} ${_FETCH_OUTPUT_ARGS.${FETCH_USING}} ${fetchfile:T} "$${site}${fetchfile:T}" ${_FETCH_AFTER_ARGS.${FETCH_USING}} && break ||'; \ + ${ECHO} ' ${ECHO} ${fetchfile:T} not fetched'; \ + ${ECHO} ' ;;'; \ + ${ECHO} ' esac;'; \ ${ECHO} 'done; }'; \ ${ECHO} ')'; \ fi) @@ -100,8 +108,16 @@ fetch-list-one-pkg: ${ECHO} "${MKDIR} ${_DISTDIR}"; \ ${ECHO} 'cd ${_DISTDIR} && { [ -f ${fetchfile} -o -f ${fetchfile:T} ] ||'; \ ${ECHO} 'for site in $$sites; do'; \ - ${ECHO} ' ${_FETCH_CMD.${FETCH_USING}} ${_FETCH_BEFORE_ARGS.${FETCH_USING}} ${_FETCH_OUTPUT_ARGS.${FETCH_USING}} ${fetchfile:T} "$${site}${fetchfile:T}" ${_FETCH_AFTER_ARGS.${FETCH_USING}} && break ||'; \ - ${ECHO} ' ${ECHO} ${fetchfile:T} not fetched'; \ + ${ECHO} ' case "$${site}" in'; \ + ${ECHO} ' -*)'; \ + ${ECHO} ' ${_FETCH_CMD.${FETCH_USING}} ${_FETCH_BEFORE_ARGS.${FETCH_USING}} ${_FETCH_OUTPUT_ARGS.${FETCH_USING}} ${fetchfile:T} "$${site#-}" ${_FETCH_AFTER_ARGS.${FETCH_USING}} && break ||'; \ + ${ECHO} ' ${ECHO} ${fetchfile:T} not fetched'; \ + ${ECHO} ' ;;'; \ + ${ECHO} ' *)'; \ + ${ECHO} ' ${_FETCH_CMD.${FETCH_USING}} ${_FETCH_BEFORE_ARGS.${FETCH_USING}} ${_FETCH_OUTPUT_ARGS.${FETCH_USING}} ${fetchfile:T} "$${site}${fetchfile:T}" ${_FETCH_AFTER_ARGS.${FETCH_USING}} && break ||'; \ + ${ECHO} ' ${ECHO} ${fetchfile:T} not fetched'; \ + ${ECHO} ' ;;'; \ + ${ECHO} ' esac;'; \ ${ECHO} 'done; }'; \ fi) . endif |