Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jun 1996 01:04:07 -0700 (PDT)
From:      asami@cs.berkeley.edu (Satoshi Asami)
To:        committers@freebsd.org
Cc:        ports@freebsd.org, jmz@freebsd.org
Subject:   review: ftpget final source
Message-ID:  <199606170804.BAA04456@silvia.HIP.Berkeley.EDU>

next in thread | raw e-mail | index | archive | help
This is the change that goes with the ftpget program.  The variable
${NCFTP] is replaced with ${FTP_CMD}, ${NCFTPFLAGS} with
${FTP_BEFORE_ARGS} and ${NCFTPTAIL} with ${FTP_AFTER_ARGS} (yes I know
that's kinda ugly but we already have a precedent in the extract
target).

Note that we can trust the exit status of the ftpget program so the
"|| true" kludge in do-fetch is gone.

Satoshi
=======
diff -ru /usr/src/share/mk/bsd.port.mk /usr/share/mk/bsd.port.mk
--- /usr/src/share/mk/bsd.port.mk	Thu Jun 13 02:26:42 1996
+++ /usr/share/mk/bsd.port.mk	Mon Jun 17 00:58:51 1996
@@ -141,8 +141,12 @@
 #				  Arguments to ${EXTRACT_CMD} following filename
 #				  (default: none).
 #
-# NCFTP			- Full path to ncftp command if not in $PATH (default: ncftp).
-# NCFTPFLAGS    - Arguments to ${NCFTP} (default: -N).
+# FTP_CMD		  - Full path to ftp/http fetch command if not in $PATH
+#				  (default: /usr/bin/ftpget).
+# FTP_BEFORE_ARGS -
+#				  Arguments to ${FTP_CMD} before filename (default: none).
+# FTP_AFTER_ARGS -
+#				  Arguments to ${FTP_CMD} followingfilename (default: none).
 #
 # Motif support:
 #
@@ -265,8 +269,7 @@
 MAKEFILE?=		Makefile
 MAKE_ENV+=		PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} MOTIFLIB="${MOTIFLIB}" CFLAGS="${CFLAGS}"
 
-NCFTP?=			/usr/bin/ncftp
-NCFTPFLAGS?=	-N
+FTP_CMD?=		/usr/bin/ftpget
 
 TOUCH?=			/usr/bin/touch
 TOUCH_FLAGS?=	-f
@@ -553,7 +556,7 @@
 			${ECHO_MSG} ">> $$file doesn't seem to exist on this system."; \
 			for site in ${MASTER_SITES}; do \
 			    ${ECHO_MSG} ">> Attempting to fetch from $${site}."; \
-				(${NCFTP} ${NCFTPFLAGS} $${site}$${file} ${NCFTPTAIL} || true); \
+				${FTP_CMD} ${FTP_BEFORE_ARGS} $${site}$${file} ${FTP_AFTER_ARGS}; \
 				if [ -f $$file -o -f `${BASENAME} $$file` ]; then \
 					continue 2; \
 				fi \
@@ -577,7 +580,7 @@
 			${ECHO_MSG} ">> $$file doesn't seem to exist on this system."; \
 			for site in ${PATCH_SITES}; do \
 			    ${ECHO_MSG} ">> Attempting to fetch from $${site}."; \
-				(${NCFTP} ${NCFTPFLAGS} $${site}$${file} ${NCFTPTAIL} || true); \
+				${FTP_CMD} ${FTP_BEFORE_ARGS} $${site}$${file} ${FTP_AFTER_ARGS}; \
 				if [ -f $$file -o -f `${BASENAME} $$file` ]; then \
 					continue 2; \
 				fi \
@@ -958,7 +961,7 @@
 	 for file in ${DISTFILES}; do \
 		if [ ! -f $$file -a ! -f `${BASENAME} $$file` ]; then \
 			for site in ${MASTER_SITES}; do \
-				${ECHO} -n ${NCFTP} ${NCFTPFLAGS} $${site}$${file} "${NCFTPTAIL}" '||' ; \
+				${ECHO} -n ${FTP_CMD} ${FTP_BEFORE_ARGS} $${site}$${file} "${FTP_AFTER_ARGS}" '||' ; \
 					break; \
 			done; \
 			${ECHO} "echo $${file} not fetched" ; \
@@ -969,7 +972,7 @@
 	 for file in ${PATCHFILES}; do \
 		if [ ! -f $$file -a ! -f `${BASENAME} $$file` ]; then \
 			for site in ${PATCH_SITES}; do \
-				${ECHO} -n ${NCFTP} ${NCFTPFLAGS} $${site}$${file} "${NCFTPTAIL}" '||' ; \
+				${ECHO} -n ${FTP_CMD} ${FTP_BEFORE_ARGS} $${site}$${file} "${FTP_AFTER_ARGS}" '||' ; \
 					break; \
 			done; \
 			${ECHO} "echo $${file} not fetched" ; \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606170804.BAA04456>