2021-10-16 20:53:51 +00:00
|
|
|
# Source this file to have hscloud tools available in your PATH after running
|
|
|
|
# `bazel run //tools:install`.
|
2018-11-01 21:39:01 +00:00
|
|
|
|
|
|
|
if [ "$0" == "$BASH_SOURCE" ]; then
|
|
|
|
echo "You should be sourcing this."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2021-10-16 20:53:51 +00:00
|
|
|
hscloud_root="$( cd "$(dirname "$BASH_SOURCE")"; pwd -P )"
|
2019-01-13 16:51:34 +00:00
|
|
|
if [ ! -f "$hscloud_root/WORKSPACE" ]; then
|
|
|
|
echo "Could not find WORKSPACE"
|
|
|
|
exit 1
|
|
|
|
fi
|
2019-07-21 14:25:07 +00:00
|
|
|
hscloud_path="$hscloud_root/bazel-bin/tools:$hscloud_root/bazel-bin/cluster/tools"
|
2019-01-13 16:51:34 +00:00
|
|
|
[[ ":$PATH:" != *":$hscloud_path:"* ]] && PATH="$hscloud_path:${PATH}"
|
2021-10-16 20:53:51 +00:00
|
|
|
unset -f hscloud_root
|
|
|
|
unset -f hscloud_path
|
2019-01-13 16:51:34 +00:00
|
|
|
|
2023-10-13 11:42:53 +00:00
|
|
|
if command -v clang &> /dev/null && [ -z $HSCLOUD_NIX ]; then
|
2023-09-22 23:42:20 +00:00
|
|
|
# if we have clang, use it
|
|
|
|
# avoids weird PATH issues with linkers, eg https://github.com/bazelbuild/bazel/issues/18834
|
|
|
|
export CC=clang
|
|
|
|
fi
|
|
|
|
|
2021-10-16 20:53:51 +00:00
|
|
|
# Leftover junk. This should be removed, as env.sh is now optional.
|
|
|
|
# Do _not_ add more aliases!
|
2020-06-05 21:37:34 +00:00
|
|
|
alias bajzel=bazel
|
2019-01-13 20:14:02 +00:00
|
|
|
gpg-unlock() {
|
|
|
|
echo "test" | gpg2 --sign --batch --no-tty -o /dev/null
|
2019-01-13 12:32:19 +00:00
|
|
|
}
|