Serge Bazanski | 0f8e5a2 | 2021-10-16 20:53:51 +0000 | [diff] [blame] | 1 | # Source this file to have hscloud tools available in your PATH after running |
| 2 | # `bazel run //tools:install`. |
Serge Bazanski | c6fd662 | 2018-11-01 22:39:01 +0100 | [diff] [blame] | 3 | |
| 4 | if [ "$0" == "$BASH_SOURCE" ]; then |
| 5 | echo "You should be sourcing this." |
| 6 | exit 1 |
| 7 | fi |
| 8 | |
Serge Bazanski | 0f8e5a2 | 2021-10-16 20:53:51 +0000 | [diff] [blame] | 9 | hscloud_root="$( cd "$(dirname "$BASH_SOURCE")"; pwd -P )" |
Sergiusz Bazanski | f2a812b | 2019-01-13 17:51:34 +0100 | [diff] [blame] | 10 | if [ ! -f "$hscloud_root/WORKSPACE" ]; then |
| 11 | echo "Could not find WORKSPACE" |
| 12 | exit 1 |
| 13 | fi |
Sergiusz Bazanski | 1663e0e | 2019-07-21 16:25:07 +0200 | [diff] [blame] | 14 | hscloud_path="$hscloud_root/bazel-bin/tools:$hscloud_root/bazel-bin/cluster/tools" |
Sergiusz Bazanski | f2a812b | 2019-01-13 17:51:34 +0100 | [diff] [blame] | 15 | [[ ":$PATH:" != *":$hscloud_path:"* ]] && PATH="$hscloud_path:${PATH}" |
Serge Bazanski | 0f8e5a2 | 2021-10-16 20:53:51 +0000 | [diff] [blame] | 16 | unset -f hscloud_root |
| 17 | unset -f hscloud_path |
Sergiusz Bazanski | f2a812b | 2019-01-13 17:51:34 +0100 | [diff] [blame] | 18 | |
Serge Bazanski | 0f8e5a2 | 2021-10-16 20:53:51 +0000 | [diff] [blame] | 19 | # Leftover junk. This should be removed, as env.sh is now optional. |
| 20 | # Do _not_ add more aliases! |
Patryk Jakuszew | 30f9d03 | 2020-06-05 23:37:34 +0200 | [diff] [blame] | 21 | alias bajzel=bazel |
Sergiusz Bazanski | de06180 | 2019-01-13 21:14:02 +0100 | [diff] [blame] | 22 | gpg-unlock() { |
| 23 | echo "test" | gpg2 --sign --batch --no-tty -o /dev/null |
Sergiusz Bazanski | b0b0f3f | 2019-01-13 13:32:19 +0100 | [diff] [blame] | 24 | } |