summaryrefslogtreecommitdiff
path: root/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
parentUpdate version. (diff)
Handle distfiles with directory names in it. Helps when the master site
has things in different directories. PR: 13926 Submitted by: jdp Reviewed by: steve
Notes
Notes: svn path=/head/; revision=22097
Diffstat (limited to '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" ; \