Wrap the script in a function and call it.