Do not wait a key to be pressed when build.sh is called by build_snapshots.sh

This commit is contained in:
Renato Botelho 2015-09-07 17:13:50 -03:00
parent 4010811baa
commit 6007bbbb18
2 changed files with 9 additions and 2 deletions

View File

@ -30,6 +30,11 @@
# OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Use an env var to let build.sh know we are running build_snapshots.sh
# This will avoid build.sh to run in interactive mode and wait a key
# to be pressed when something goes wrong
export NOT_INTERACTIVE=1
export BUILDER_TOOLS=$(realpath $(dirname ${0}))
export BUILDER_ROOT=$(realpath "${BUILDER_TOOLS}/..")

View File

@ -155,8 +155,10 @@ print_error_pfS() {
echo "Log saved on ${LOGFILE}" && \
tail -n20 ${LOGFILE} >&2
echo
echo "Press enter to continue."
read ans
if [ -z "${NOT_INTERACTIVE}" ]; then
echo "Press enter to continue."
read ans
fi
kill $$
exit 1
}