Project

General

Profile

« Previous | Next » 

Revision 10022

lib/sh/util.sh: command(): added nonrecursive=1 flag, which uses cmd2abs_path to run an external command nonrecursively

View differences:

lib/sh/util.sh
743 743

  
744 744
alias_append save_e '; unset redirs' # don't redirect error handlers
745 745

  
746
command() # usage: [cmd_log_fd=|1|2|#] [verbosity_min=] command extern_cmd...
746
fi # load new aliases
747
if self_being_included; then
748

  
749
command() # usage: [cmd_log_fd=|1|2|#] [verbosity_min=] [nonrecursive=1] \
750
# command extern_cmd...
747 751
{
748 752
	echo_func; kw_params log_fd cmd_log_fd redirs verbosity_min
749 753
	# if no cmd_log_fd, limit log_fd in case command uses util.sh
......
760 764
		fi
761 765
	fi
762 766
	
763
	cmd2rel_path
767
	if test "$nonrecursive"; then cmd2abs_path; else cmd2rel_path; fi
764 768
	redir command__exec "$@" || die_e
765 769
}
766 770
command__exec()

Also available in: Unified diff