This commit is contained in:
2018-10-02 21:01:12 -05:00
parent bbf37aabf1
commit 9bf3ec989f
2 changed files with 33 additions and 3 deletions

13
default.inc Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
do_with_root() {
if [[ `whoami` = 'root' ]]; then
$*
elif [[ -x /bin/sudo || -x /usr/bin/sudo ]]; then
echo "sudo $*"
sudo $*
else
echo -e "${BOrange}Please run this script as root.${Color_Off}"
exit 1
fi
}