hscloud/env.sh
Patryk Jakuszew 30f9d03106 WORKSPACE: Shuffle things around to fix tools build on macOS
Change-Id: I281c1209620e9f3a017718fda1401d1ead9c52a4
2020-06-05 23:37:34 +02:00

28 lines
648 B
Bash

# source me to have all the nice things
if [ "$0" == "$BASH_SOURCE" ]; then
echo "You should be sourcing this."
exit 1
fi
export hscloud_root="$( cd "$(dirname "$BASH_SOURCE")"; pwd -P )"
if [ ! -f "$hscloud_root/WORKSPACE" ]; then
echo "Could not find WORKSPACE"
exit 1
fi
hscloud_path="$hscloud_root/bazel-bin/tools:$hscloud_root/bazel-bin/cluster/tools"
[[ ":$PATH:" != *":$hscloud_path:"* ]] && PATH="$hscloud_path:${PATH}"
# Detect NixOS
if [ -d /nix ] && [ ! -f /lib/ld-linux.so.2 ]; then
export hscloud_nixos=true
fi
alias bajzel=bazel
gpg-unlock() {
echo "test" | gpg2 --sign --batch --no-tty -o /dev/null
}