blob: 7ef445f296073bd6f8b6794f2f74302864c29df8 [file] [log] [blame]
Serge Bazanskic6fd6622018-11-01 22:39:01 +01001# source me to have all the nice things
2
3if [ "$0" == "$BASH_SOURCE" ]; then
4 echo "You should be sourcing this."
5 exit 1
6fi
7
Sergiusz Bazanskide061802019-01-13 21:14:02 +01008export hscloud_root="$( cd "$(dirname "$BASH_SOURCE")"; pwd -P )"
Serge Bazanskic6fd6622018-11-01 22:39:01 +01009
Sergiusz Bazanskif2a812b2019-01-13 17:51:34 +010010if [ ! -f "$hscloud_root/WORKSPACE" ]; then
11 echo "Could not find WORKSPACE"
12 exit 1
13fi
14
Sergiusz Bazanski1663e0e2019-07-21 16:25:07 +020015hscloud_path="$hscloud_root/bazel-bin/tools:$hscloud_root/bazel-bin/cluster/tools"
Sergiusz Bazanskif2a812b2019-01-13 17:51:34 +010016
17[[ ":$PATH:" != *":$hscloud_path:"* ]] && PATH="$hscloud_path:${PATH}"
18
Sergiusz Bazanskic5a77b82020-02-17 23:04:35 +010019# Detect NixOS
20if [ -d /nix ] && [ ! -f /lib/ld-linux.so.2 ]; then
Piotr Dobrowolski22594372020-03-21 23:44:10 +010021 export hscloud_nixos=true
Sergiusz Bazanskic5a77b82020-02-17 23:04:35 +010022fi
23
Patryk Jakuszew30f9d032020-06-05 23:37:34 +020024alias bajzel=bazel
25
Sergiusz Bazanskide061802019-01-13 21:14:02 +010026gpg-unlock() {
27 echo "test" | gpg2 --sign --batch --no-tty -o /dev/null
Sergiusz Bazanskib0b0f3f2019-01-13 13:32:19 +010028}