Push improvements form the PQB work

This commit is contained in:
Gal Szkolnik 2022-09-29 18:29:13 -04:00
parent f3323b159b
commit 1e3c60630e
68 changed files with 409 additions and 219 deletions

View file

@ -1,3 +1,7 @@
warn() {
(>&2 printf '\E[34mWARNING:\E[0m %s\n' "$@" )
}
error() {
(>&2 printf '\E[31mERROR:\E[0m %s\n' "$@" )
}
@ -9,6 +13,13 @@ require_root() {
fi
}
recommend_root() {
if [[ $EUID -ne 0 ]]; then
warn "This script works better using sudo or as the root user"
return 3
fi
}
function setacl() {
if [[ $# -lt 4 ]]; then
error "setacl missing arguments, called with '$1' ${@:2}"