Revision 13268
Added by Aaron Marcuse-Kubitza almost 11 years ago
trunk/lib/runscripts/util.run | ||
---|---|---|
85 | 85 |
function sudo() # usage: sudo fn|cmd ... # supports shell functions as well |
86 | 86 |
{ |
87 | 87 |
echo_func |
88 |
if is_intern "$1"; then set -- $wrap_fn "$@"; fi # shell function, etc. |
|
88 |
if test "$1" = command; then shift # always executable->$wrap_fn not needed |
|
89 |
elif is_intern "$1"; then set -- $wrap_fn "$@" # shell function, etc. |
|
90 |
fi |
|
89 | 91 |
sudo__util_sh "$@" |
90 | 92 |
} |
91 | 93 |
|
Also available in: Unified diff
lib/runscripts/util.run: sudo(): avoid slow $wrap_fn when using `command` (ie. always executable)