From: Sascha Wildner Date: Thu, 29 May 2014 18:21:03 +0000 (+0200) Subject: nrelease: Verify that $DPORTS_TREE indeed exists as a directory. X-Git-Url: https://gitweb.dragonflybsd.org/~nant/dragonfly.git/commitdiff_plain/aa3eeb1274af9bc7e400dd636231244b0addf078 nrelease: Verify that $DPORTS_TREE indeed exists as a directory. Also, if it exists, output its name so it can be looked up in the logfile (in case there might have been a typo when overriding the default). --- diff --git a/nrelease/Makefile b/nrelease/Makefile index d896c8d60b..7f6cdb0e83 100644 --- a/nrelease/Makefile +++ b/nrelease/Makefile @@ -156,17 +156,18 @@ check: @echo "Your machine does not have cdrtools installed. You can install it with:" @echo " pkg install cdrtools" .endif -.if !defined(DPORTS_PATH) - @echo "Please set DPORTS_PATH to the dports tree that shall be used for" - @echo "package building. For example /usr/dports. See the Makefile" - @echo "in /usr if you are unfamiliar with dports." -.endif + @if [ ! -d ${DPORTS_PATH} ]; then \ + echo "${DPORTS_PATH} does not exist."; \ + echo ""; \ + echo "Please set DPORTS_PATH to the dports tree that shall be used for"; \ + echo "package building. The default is /usr/dports. See the Makefile in"; \ + echo "/usr if you are unfamiliar with dports."; \ + /usr/bin/false; \ + fi .if !exists(/usr/local/bin/mkisofs) && !exists(/usr/pkg/bin/mkisofs) @/usr/bin/false .endif -.if !defined(DPORTS_PATH) - @/usr/bin/false -.endif + @echo "Using ${DPORTS_PATH} as the dports tree." buildworld1 buildworld2: cd ${.CURDIR}/..; \