add optional sudo for work

This commit is contained in:
Didier Slof 2023-09-03 00:43:07 +02:00
parent 9ba500564b
commit 8374e98494
Signed by: didier
GPG key ID: 01E71F18AA4398E5

1
dot
View file

@ -18,6 +18,7 @@ include() {
func() { func() {
if is_function $(echo "super_$2"); then if is_function $(echo "super_$2"); then
[ "${DO_SUDO:-yes}" = "yes" ] || return 0
sudo sh -c ". $1 && super_$2" sudo sh -c ". $1 && super_$2"
fi fi
is_function $2 && $2 is_function $2 && $2