add optional sudo for work

This commit is contained in:
Strix 2023-10-14 22:38:13 +02:00
parent 7d407d5b8a
commit ae71a698f5
No known key found for this signature in database
GPG key ID: 49B2E37B8915B774

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