```
XKBROOTTMP="`mktemp -d crouton-xkb.XXXXXX --tmpdir=/tmp`"
TRAP="rm -rf '$XKBROOTTMP';$TRAP"
trap "$TRAP" INT HUP 0
```
and then you can get rid of all the `|| error='y'` stuff; the directory will be removed when the script quits for any reason (successful or otherwise).