Commit 08b3c764 by Rainer Orth Committed by Rainer Orth

run_acats (which): Extract last field from type -p, type output only if command succeeded.

	* ada/acats/run_acats (which): Extract last field from type -p,
	type output only if command succeeded.

From-SVN: r175843
parent 441e4f53
2011-07-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* ada/acats/run_acats (which): Extract last field from type -p,
type output only if command succeeded.
2011-07-04 Jason Merrill <jason@redhat.com>
* g++.dg/abi/mangle48.C: New.
......
......@@ -14,8 +14,8 @@ fi
# Fall back to whence which ksh88 and ksh93 provide, but bash does not.
which () {
path=`type -p $* 2>/dev/null | awk '{print $NF}'` && { echo $path; return 0; }
path=`type $* 2>/dev/null | awk '{print $NF}'` && { echo $path; return 0; }
path=`type -p $* 2>/dev/null` && { echo $path | awk '{print $NF}'; return 0; }
path=`type $* 2>/dev/null` && { echo $path | awk '{print $NF}'; return 0; }
path=`whence $* 2>/dev/null` && { echo $path; return 0; }
return 1
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment