mirror of
https://github.com/ivabus/pantry
synced 2024-09-20 00:30:48 +03:00
make gx/cc savvy to ~/.tea/.loca/bin
Fixes https://github.com/teaxyz/cli/issues/610
This commit is contained in:
parent
4bfbe8d7f4
commit
3f7ce4e6fd
|
@ -19,7 +19,7 @@ end.compact
|
|||
# find next example of ourselves
|
||||
# this will either pick the Apple provided clang or the tea one
|
||||
exe_path = ENV['PATH'].split(":").filter { |path|
|
||||
path != File.dirname(__FILE__)
|
||||
path != File.dirname(__FILE__) && path != File.join($tea_prefix, ".local/bin")
|
||||
}.map { |path|
|
||||
"#{path}/#{exe}"
|
||||
}.reject { |path|
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
if test -z "$TEA_PREFIX"
|
||||
then
|
||||
echo 'TEA_PREFIX mysteriously unset' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dir=$(dirname "$0")
|
||||
exe=$(basename "$0")
|
||||
|
||||
# Remove us from our path
|
||||
PATH=$(echo "$PATH" | tr ":" "\n" | grep -v "$dir" | tr "\n" ":")
|
||||
PATH=$(echo "$PATH" | tr ":" "\n" | grep -v "$TEA_PREFIX/.local/bin" | tr "\n" ":")
|
||||
|
||||
# If we can find our specific name, e.g. `lld`,
|
||||
# passthrough to that
|
||||
|
@ -20,18 +27,12 @@ else
|
|||
exit 127
|
||||
fi
|
||||
|
||||
if test -z "$TEA_PREFIX"
|
||||
then
|
||||
echo 'TEA_PREFIX mysteriously unset' >&2
|
||||
exit 1
|
||||
else
|
||||
# At a minimum, `ld` will complain if you mix the `-r` and `-rpath` flags,
|
||||
# so if any argument to this script is `-r`, we just pass through without
|
||||
# additions.
|
||||
for word in "$@"; do
|
||||
if test "$word" = "-r"; then
|
||||
exec "$exe" "$@"
|
||||
fi
|
||||
done
|
||||
exec "$exe" "$@" -rpath "$TEA_PREFIX"
|
||||
fi
|
||||
# At a minimum, `ld` will complain if you mix the `-r` and `-rpath` flags,
|
||||
# so if any argument to this script is `-r`, we just pass through without
|
||||
# additions.
|
||||
for word in "$@"; do
|
||||
if test "$word" = "-r"; then
|
||||
exec "$exe" "$@"
|
||||
fi
|
||||
done
|
||||
exec "$exe" "$@" -rpath "$TEA_PREFIX"
|
||||
|
|
|
@ -3,7 +3,7 @@ distributable: ~
|
|||
# FIXME we want the c version eg. c99
|
||||
# or should that be some kind of option? so you specify you want a cc that support c99
|
||||
versions:
|
||||
- 0.1.4
|
||||
- 0.1.5
|
||||
|
||||
dependencies:
|
||||
linux:
|
||||
|
|
Loading…
Reference in a new issue