chore(style): add shebang, set bash strict mode, create function
[webi-installers/.git] / sudo / install.sh
1 #!/bin/bash
2 set -e
3 set -u
4
5 function __init_sudo() {
6
7     if [ -z "$(command -v sudo)" ]; then
8         echo >&2 "Error: on Linux and BSD you should install sudo via the native package manager"
9         echo >&2 "       for example: apt install -y sudo"
10         exit 1
11     else
12         echo "'sudo' already installed"
13     fi
14
15 }
16
17 __init_sudo