Fix the error trap, so that it is setup before acquiring the lockfile.

This commit is contained in:
Laurent Rineau
2009-07-20 09:43:17 +00:00
parent 70ec9b7ff7
commit 90d0abd973
@@ -858,6 +858,9 @@ else
MAKE_CMD='make'
fi
# that line makes the script remove the lock file in case of unwanted exit
trap "rm -f $LOCK_FILE" EXIT HUP INT TERM
# Acquire lock
lockfile -r 5 "$LOCK_FILE";
if [ ${?} != 0 ]; then
@@ -865,9 +868,6 @@ if [ ${?} != 0 ]; then
exit 1;
fi
# that line makes the script remove the lock file in case of unwanted exit
trap "rm -f $LOCK_FILE" EXIT HUP INT TERM
# Notify test started
if [ ! "${MAIL_ADDRESS}" = "must_be_set_in_.autocgalrc" ]; then
for i in ${MAIL_ADDRESS}; do