mkefidisk.sh: Add die() and cleanup() routines
authorDarren Hart <dvhart@linux.intel.com>
Wed, 16 Jul 2014 14:16:02 +0000 (14:16 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 18 Jul 2014 23:09:00 +0000 (00:09 +0100)
commit0c9d09ab5db267e841daee8c95a3d3d6337504f8
tree40c8f6c84ee89f7fc61ea7c95b651368833fc95c
parentb8be97da0bedc6499ba93e47835d0a5218e27116
mkefidisk.sh: Add die() and cleanup() routines

Currently the script will attempt to continue even after a fatal error.
Add a die() routine which will abort in the case of a fatal error and
call a cleanup() routine to unmount any images or devices and remove the
TMPDIR.

Move the variable assignment and directory creation earlier in the
script, making it more obvious what we need to clean up.

(From OE-Core rev: 40fe82fecf7a94b24893862ac17ee2bc749fc5e8)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/contrib/mkefidisk.sh