I started a new job that mostly uses Ubuntu, and has an apt-get based boostrap script for bash. I've renamed the packages as appropriate from MacPorts, but some of the programs take long enough to build/install that sudo times out. Is there a way I can prompt for the password at the beginning of the script and then not ask for it again until the script is over?
My thoughts are that I can somehow set a per-terminal session variable to override the sudo timeout then restore it, but I don't know if this is the best way. Ideally a new person could run this on the first day and walk away while they tend to more administrative stuff.