This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Are we already su? If not then ask for it | |
if [[ "$EUID" != 0 ]]; then | |
sudo -k # make sure to ask for password on next sudo | |
if ! sudo true; then | |
echo "Password fail, aborting" | |
exit 1 | |
fi | |
fi |