~strahinja/dotfiles

993297f5de07ad53084263bb9e755c4b64725b71 — Страхиња Радић 2 months ago 47145da
bin/llvm-find: Improve strategy when no -?? executables present

Signed-off-by: Страхиња Радић <sr@strahinja.org>
1 files changed, 5 insertions(+), 3 deletions(-)

M bin/llvm-find
M bin/llvm-find => bin/llvm-find +5 -3
@@ 2,6 2,8 @@
# vim: ft=bash:

exec /usr/bin/env PATH=/usr/local/bin:/usr/bin:/bin \
	"$(find /usr/bin /usr/local/bin -name "${0##*/}"'-??' -print |
	sort -Vr | sed 1q || printf "%s" "${0##*/}")" $(printf "%s" "$*" |
		tr -d '\\\n`;$()')
	"$( (	commands=$(find /usr/bin /usr/local/bin -name "${0##*/}"'-??' \
			-print)
		[ -n "$commands" ] || commands=$(printf "%s" "${0##*/}")
		printf "%s\n" "$commands"
	   ) | sort -Vr | sed 1q )" $(printf "%s" "$*" | tr -d '\\\n`;$()')