Project

General

Profile

« Previous | Next » 

Revision 13277

lib/sh/util.sh: cmd2rel_path: use is_extern()

View differences:

trunk/lib/sh/util.sh
709 709

  
710 710
# makes $1 a canon_rel_path if it's a filesystem path
711 711
alias cmd2rel_path="$(cat <<'EOF'
712
if test "$(type -t "$1")" = file && test -e "$1"; then # not relative to PATH
712
if is_extern "$1" && test -e "$1"; then # not relative to PATH
713 713
	declare _1="$1"; shift
714 714
	_1="$(log++ canon_rel_path "$_1")" || return
715 715
	set -- "$_1" "$@"

Also available in: Unified diff