Syntax error in update script

I don't know if I'm alone with this problem or in all Ubuntu 14.10 "update script" reports syntax error.
I notice two suspicious things. Shell, do not have `function` and do not have `[[ ]]` (double bracket). So I removed them and everything started work fine.
Zsh and bash actually have them both and I think this is reason why this is in this script. Is this necessary to include them in this script?