forked from holochain-gym/developer-exercises
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck_running_in_gym_nix_shell.sh
executable file
·33 lines (29 loc) · 1.27 KB
/
check_running_in_gym_nix_shell.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
if [[ -z $IN_NIX_SHELL ]]; then
echo "It looks like you are NOT running in a nix-shell"
echo "Go to the base folder of the developer-exercises, "
echo "where you find default.nix, "
echo "and run 'nix-shell' in the command line."
exit 1
fi
HC_VERSION=$(hn-introspect | grep holochain:)
CORRECT_HC_VERSION="- holochain: https://github.com/holochain/holochain/archive/holochain-0.0.109.tar.gz"
if [[ $HC_VERSION != $CORRECT_HC_VERSION ]]; then
echo "It looks like you are running in an OLD nix-shell"
echo "Go to the base folder of the developer-exercises, "
echo "where you find default.nix, "
echo "and run 'nix-shell' in the command line."
exit 1
fi
## in the future add check to see if we are running in the nix-shell for holochain-gym
#
# if [[ -z $IN_NIX_SHELL_GYM ]]; then
# echo "I looks like you are NOT running in THE RIGHT nix-shell"
# echo "for the holochain-gym exercises."
# echo "Go to the base folder of the developer-exercises, "
# echo "where you find default.nix, "
# echo "and run 'nix-shell' in the command line."
# exit 1
# fi
## in the future add check to see if are running an old configuration of the holochain-gym nix-shell
# echo "I looks like you are NOT running in an OLD nix-shell configuration"