forked from Chia-Network/chia-blockchain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-timelord.sh
35 lines (31 loc) · 1.31 KB
/
install-timelord.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
34
35
THE_PATH=`python -c 'import pkg_resources; print( pkg_resources.get_distribution("chiavdf").location)' 2> /dev/null`/vdf_client
CHIAVDF_VERSION=`python -c 'from setup import dependencies; t = [_ for _ in dependencies if _.startswith("chiavdf")][0]; print(t)'`
if [ `uname` = "Linux" ] && type apt-get;
then UBUNTU_DEBIAN=1
echo "Found Ubuntu/Debian $UBUNTU_DEBIAN"
else
UBUNTU_DEBIAN=0
fi
echo "This script assumes it is run from the chia venv - '. ./activate' before running."
if [ -e $THE_PATH ]
then
echo $THE_PATH
echo "vdf_client already exists, no action taken"
else
if [ -e venv/bin/python ] && [$UBUNTU_DEBIAN]
then
echo "installing chiavdf from source on Ubuntu/Debian"
# Check for development tools
sudo apt-get install cmake libgmp-dev libboost-python-dev libbost-system-dev -y
echo venv/bin/python -m pip install --force --no-binary chiavdf $CHIAVDF_VERSION
venv/bin/python -m pip install --force --no-binary chiavdf $CHIAVDF_VERSION
elif [ -e venv/bin/python ]
then
echo "installing chiavdf from source"
# User needs to provide required packages
echo venv/bin/python -m pip install --force --no-binary chiavdf $CHIAVDF_VERSION
#venv/bin/python -m pip install --force --no-binary chiavdf $CHIAVDF_VERSION
else
echo "no venv created yet, please run install.sh"
fi
fi