diff --git a/README.md b/README.md index cd4653e..d5db485 100644 --- a/README.md +++ b/README.md @@ -241,6 +241,7 @@ works: Please note that reissuing ports builds will clear plugins and core progress. However, following option apply to PORTSENV: +* BATCH=no Developer mode with shell after each build failure * DEPEND=no Do not tamper with plugins or core packages * PRUNE=no Do not check ports integrity prior to rebuild * SILENT=no Do not use make(1) -s command line option diff --git a/build/ports.sh b/build/ports.sh index 03e74fc..1b6e099 100644 --- a/build/ports.sh +++ b/build/ports.sh @@ -36,7 +36,7 @@ eval ${PORTSENV} ARGS=${*} DEPS= -for OPT in DEPEND PRUNE SILENT; do +for OPT in BATCH DEPEND PRUNE SILENT; do VAL=$(eval echo \$${OPT}); case ${VAL} in yes|no) @@ -118,6 +118,10 @@ fi sh ./make.conf.sh > ${STAGEDIR}/etc/make.conf +if [ ${BATCH} = "no" ]; then + sed -i '' -e 's/^#DEVELOPER=/DEVELOPER=/' ${STAGEDIR}/etc/make.conf +fi + cat > ${STAGEDIR}/bin/echotime <>> Aborted version \${PKGVERS} for \${PORT_ORIGIN}" >> /.pkg-err - if [ -n "${PRODUCT_REBUILD}" ]; then - exit 1 - else - ${MAKECMD} -C ${PORTSDIR}/\${PORT} clean \${MAKE_ARGS} - continue + CONTINUE= + + if [ ${BATCH} = "no" ]; then + echo ">>> Interactive shell for \${PORT} (use \"exit 1\" to abort)" + (cd ${PORTSDIR}/\${PORT}; sh < /dev/tty) || exit 1 + CONTINUE=1 fi + + if [ -n "${PRODUCT_REBUILD}" -a -z "\${CONTINUE}" ]; then + exit 1 + fi + + ${MAKECMD} -C ${PORTSDIR}/\${PORT} clean \${MAKE_ARGS} + continue fi if [ -n "${PRODUCT_REBUILD}" ]; then