aboutsummaryrefslogtreecommitdiff
path: root/Mk/bsd.port.mk
diff options
context:
space:
mode:
authorSatoshi Asami <asami@FreeBSD.org>1999-10-01 09:28:32 +0000
committerSatoshi Asami <asami@FreeBSD.org>1999-10-01 09:28:32 +0000
commit86e007742aa48b674103cf693e113d8a5306b6b6 (patch)
tree18f34af98a3c2f96d12635f49f85f0b2805c924c /Mk/bsd.port.mk
parentd4e27a0b29cea4dc2fb6c2509a38a4a984e4be16 (diff)
downloadports-86e007742aa48b674103cf693e113d8a5306b6b6.tar.gz
ports-86e007742aa48b674103cf693e113d8a5306b6b6.zip
Notes
Diffstat (limited to 'Mk/bsd.port.mk')
-rw-r--r--Mk/bsd.port.mk26
1 files changed, 22 insertions, 4 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index cf77e4dda110..7732e8dec0a3 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -1474,7 +1474,12 @@ do-fetch:
${ECHO_MSG} ">> Attempting to fetch from $${site}."; \
DIR=${DIST_SUBDIR}; \
CKSIZE=`${GREP} "^SIZE ($${DIR:+$$DIR/}$$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \
- if ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${file} ${FETCH_AFTER_ARGS}; then \
+ case $${file} in \
+ */*) ${MKDIR} $${file%/*}; \
+ args="-o $${file} $${site}$${file}";; \
+ *) args=$${site}$${file};; \
+ esac; \
+ if ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${args} ${FETCH_AFTER_ARGS}; then \
continue 2; \
fi \
done; \
@@ -1498,7 +1503,12 @@ do-fetch:
${ECHO_MSG} ">> Attempting to fetch from $${site}."; \
DIR=${DIST_SUBDIR}; \
CKSIZE=`${GREP} "^SIZE ($${DIR:+$$DIR/}$$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \
- if ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${file} ${FETCH_AFTER_ARGS}; then \
+ case $${file} in \
+ */*) ${MKDIR} $${file%/*}; \
+ args="-o $${file} $${site}$${file}";; \
+ *) args=$${site}$${file};; \
+ esac; \
+ if ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${args} ${FETCH_AFTER_ARGS}; then \
continue 2; \
fi \
done; \
@@ -2033,7 +2043,11 @@ fetch-list:
for site in ${MASTER_SITES}; do \
DIR=${DIST_SUBDIR}; \
CKSIZE=`${GREP} "^SIZE ($${DIR:+$$DIR/}$$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \
- ${ECHO} -n ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${file} "${FETCH_AFTER_ARGS}" '||' ; \
+ case $${file} in \
+ */*) args="-o $${file} $${site}$${file}";; \
+ *) args=$${site}$${file};; \
+ esac; \
+ ${ECHO} -n ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${args} "${FETCH_AFTER_ARGS}" '||' ; \
break; \
done; \
${ECHO} "echo $${file} not fetched" ; \
@@ -2046,7 +2060,11 @@ fetch-list:
for site in ${PATCH_SITES}; do \
DIR=${DIST_SUBDIR}; \
CKSIZE=`${GREP} "^SIZE ($${DIR:+$$DIR/}$$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \
- ${ECHO} -n ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${file} "${FETCH_AFTER_ARGS}" '||' ; \
+ case $${file} in \
+ */*) args="-o $${file} $${site}$${file}";; \
+ *) args=$${site}$${file};; \
+ esac; \
+ ${ECHO} -n ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${args} "${FETCH_AFTER_ARGS}" '||' ; \
break; \
done; \
${ECHO} "echo $${file} not fetched" ; \