Don't use SUDO in the installation script. If sudo is required, then it should be done against the script itself. Otherwise this can cause problems if specific bash variables need to be accessed by the script (like forward proxies URLs, etc).