I'm running a script to install imagemagick on MacOSX Lion. Periodically it will halt progress to ask for the root password, which I enter and everything is great. But there was one point where it asked, and I wasn't paying attention and because I didn't respond in time (surprised there is a time limit here) it halted execution. So is there a way to pass along a flag that says use this password when asked when running a shell script?
Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.
Just use a sane tool to install ImageMagick. Either Homebrew or MacPorts will not ask for a password more than once (when started with sudo). Both have the advantage to allow easy removal of installed software.
Starting your script with sudo might be another way to prevent it to ask for the password more than once.