hscloud/env.sh
Piotr Dobrowolski 2259437930 env: fix missing hscloud_nixos export
Change-Id: I1887a06908e8b50926288d4cd9c9a820dd795ae0
2020-03-21 23:44:10 +01:00

26 lines
628 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
gpg-unlock() {
echo "test" | gpg2 --sign --batch --no-tty -o /dev/null
}