diff --git a/dot b/dot index ed8b427..17ee37d 100755 --- a/dot +++ b/dot @@ -19,8 +19,9 @@ include() { func() { if is_function $(echo "super_$2"); then [ "${DO_SUDO:-yes}" = "yes" ] || return 0 - cmd=". $1 && super_$2" - [ "$(id -u)" = "0" ] && sh -c "$cmd" || sudo sh -c "$cmd" + ecmd=". $1 && super_$2" + [ "$(id -u)" = "0" ] && sh -c "$ecmd" || sudo sh -c "$ecmd" + unset ecmd fi is_function $2 && $2 }