diff --git a/glim.sh b/glim.sh index 65f5e5c..435ee70 100755 --- a/glim.sh +++ b/glim.sh @@ -9,6 +9,17 @@ if [[ `id -u` -eq 0 ]]; then exit 1 fi +# Use alternative if sudo is not found +if [[ ! `which sudo` ]]; then + if which doas; then + alias sudo doas + else + sudo () { + su -c "$*" + } + fi +fi + # Sanity check : GRUB2 if which grub2-install &>/dev/null; then GRUB2_INSTALL="grub2-install"