mirror of
https://github.com/ben-grande/qusal.git
synced 2025-08-01 18:56:12 -04:00
feat: enable all optional shellcheck validations
Make shell a little bit safer with: - add-default-case - check-extra-masked-returns - check-set-e-suppressed - quote-safe-variables - check-unassigned-uppercase Although there are some stylistic decisions for uniformity: - avoid-nullary-conditions - deprecated-which - require-variable-braces
This commit is contained in:
parent
011a71a36d
commit
224312ed42
55 changed files with 343 additions and 219 deletions
|
@ -6,8 +6,11 @@
|
|||
|
||||
set -eu
|
||||
|
||||
test "$(hostname)" = "dom0" || { echo "Must be run from dom0" >&2; exit 1; }
|
||||
test "$(id -u)" = "0" || exec sudo "${0}"
|
||||
# shellcheck disable=3028
|
||||
hostname="$(hostname)}"
|
||||
test "${hostname}" = "dom0" || { echo "Must be run from dom0" >&2; exit 1; }
|
||||
uid="$(id -u)"
|
||||
test "${uid}" = "0" || exec sudo "${0}"
|
||||
|
||||
group="qusal"
|
||||
file_roots="/srv/salt/${group}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue