add optional sudo for work
This commit is contained in:
parent
9ba500564b
commit
8374e98494
1 changed files with 1 additions and 0 deletions
1
dot
1
dot
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue