update.sh: cleanup the cleanup code a bit
commitf28aeaf9081885d79b9ca3927c7836e77559e4d4
authorKyle J. McKay <mackyle@gmail.com>
Sun, 13 Sep 2020 05:58:30 +0000 (12 22:58 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Sun, 13 Sep 2020 05:58:30 +0000 (12 22:58 -0700)
tree024476db387b8be6d282a0357b576fdf303150c6
parentdd493b1e4f116d26398edd5eea342089e60568e7
update.sh: cleanup the cleanup code a bit

Put the cleanup code in a function and use the function name
as the `trap` argument rather than trying to stuff all the code
into a string.

Also take this opportunity to make the code slightly more robust
and trap more possible abnormal exits.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
jobd/update.sh