mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-08-19 03:56:16 +00:00
chore(style): convert blocks into functions (see #325)
This commit is contained in:
+5
-1
@@ -1,7 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -u
|
||||
|
||||
{
|
||||
function __init_sudo() {
|
||||
|
||||
if [ -z "$(command -v sudo)" ]; then
|
||||
echo >&2 "Error: on Linux and BSD you should install sudo via the native package manager"
|
||||
@@ -12,3 +14,5 @@ set -u
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
__init_sudo
|
||||
|
||||
Reference in New Issue
Block a user