I'm writing a cross-platform shell script that's supposed to work on Unix, Cygwin, and msys. In my shell script I need to perform actions with elevated privileges. On Unix you would do this via sudo
, and on Cygwin via something like cygstart --action=runas
. What's the equivalent for msys?
All my Googling so far has only turned up this, which isn't practical from a shell script since you have to interact with the GUI.