X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=sudo%2Finstall.sh;h=112d8e74db8f25fef21778ec019a6163a560fe18;hb=4edf137e5d6b65f9ac847db6694ac387c7e91f3e;hp=6b370606fd7328b6849f15d80548992f87e6ade1;hpb=5a31bc4a46158230203d68bec1e5768bc644bbb1;p=webi-installers%2F.git diff --git a/sudo/install.sh b/sudo/install.sh index 6b37060..112d8e7 100644 --- a/sudo/install.sh +++ b/sudo/install.sh @@ -1,14 +1,17 @@ +#!/bin/bash set -e set -u -{ +function __init_sudo() { if [ -z "$(command -v sudo)" ]; then - >&2 echo "Error: on Linux and BSD you should install sudo via the native package manager" - >&2 echo " for example: apt install -y sudo" + echo >&2 "Error: on Linux and BSD you should install sudo via the native package manager" + echo >&2 " for example: apt install -y sudo" exit 1 else echo "'sudo' already installed" fi } + +__init_sudo