Invoke sudo at the beginning of the script if the user specified -i