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