Some of the steps require user input. Is the "set -e" for dealing with that? Also at least one reboot is needed, the script depends on a lot of external sources being up, and I have seen different behavior on the kernel upgrade steps.
No, see edit. But there are ways to do user input in shell, see Google. (By which I mean I literally do not personally know the best answers and that's what I'd be doing anyhow if I tried to explain here.)