Date: Mon, 20 Aug 2018 19:39:49 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338114 - head/usr.sbin/mergemaster Message-ID: <201808201939.w7KJdngc080492@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Mon Aug 20 19:39:49 2018 New Revision: 338114 URL: https://svnweb.freebsd.org/changeset/base/338114 Log: mergemaster: better defaults for SOURCEDIR If we can't find a Makefile.inc1 in the specified / default SOURCEDIR, and there's a Makefile.inc1 in the current directory, offer the user the choice of using . for SOURCEDIR. Differential Revsion: https://reviews.freebsd.org/D16709 Modified: head/usr.sbin/mergemaster/mergemaster.sh Modified: head/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.sh Mon Aug 20 19:09:39 2018 (r338113) +++ head/usr.sbin/mergemaster/mergemaster.sh Mon Aug 20 19:39:49 2018 (r338114) @@ -483,6 +483,27 @@ if [ ! -f ${SOURCEDIR}/Makefile.inc1 -a \ sleep 3 SOURCEDIR=${SOURCEDIR}/.. fi +if [ ! -f ${SOURCEDIR}/Makefile.inc1 ]; then + echo "*** ${SOURCEDIR} was not found." + if [ -f ./Makefile.inc1 ]; then + echo " Found Makefile.inc1 in the current directory." + echo -n " Would you like to set SOURCEDIR to $(pwd)? [no and exit] " + read SRCDOT + case "${SRCDOT}" in + [yY]*) + echo " *** Setting SOURCEDIR to $(pwd)" + SOURCEDIR=$(pwd) + ;; + *) + echo " **** No suitable ${SOURCEDIR} found, exiting" + exit 1 + ;; + esac + else + echo " **** No suitable ${SOURCEDIR} found, exiting" + exit 1 + fi +fi SOURCEDIR=$(realpath "$SOURCEDIR") # Setup make to use system files from SOURCEDIR
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808201939.w7KJdngc080492>