forked from consensus-ai/sentient-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprepare.sh
executable file
·51 lines (37 loc) · 1.13 KB
/
prepare.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
# error output terminates this script
set -e
# ensure we have a clean node_modules
rm -rf ./node_modules
npm install
# build the UI's js
rm -rf ./dist
# clean up folders
rm -rf release/*
rm -rf tools
mkdir tools
installResources() {
platform=$1
os=$2
wget "https://s3.us-east-2.amazonaws.com/consensus-ai-releases/sentient-network-tools/sentient-network-tools-${platform}-amd64.zip"
unzip "sentient-network-tools-${platform}-amd64.zip" -d tools
mkdir tools/${os}
mkdir tools/${os}/sentient-miner
bin='sentient-miner'
if [ $platform = 'windows' ]; then
bin="${bin}.exe"
fi
unzip tools/sentient-miner-*.zip -d tools/${os}/sentient-miner
mv tools/${os}/sentient-miner/sentient-miner* tools/${os}/sentient-miner/${bin}
# moving miner code to the correct folder
unzip tools/sentient-network-*.zip -d tools/${os}
# clean up
rm tools/sentient-miner-*.zip
rm tools/sentient-network-*.zip
rm -rf sentient-network-*
# moving network code to the correct folder
mv tools/${os}/sentient-network-* tools/${os}/sentient-network
}
installResources "osx" "mac"
installResources "linux" "linux"
installResources "windows" "win"