-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathsetup
More file actions
executable file
·80 lines (72 loc) · 1.8 KB
/
Copy pathsetup
File metadata and controls
executable file
·80 lines (72 loc) · 1.8 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/bash
# This script runs the same sequence as the CircleCI build
if [ $(uname) == "Darwin" ]; then
if which brew >/dev/null; then
echo "Brew is already installed"
else
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
fi
# install nodejs
if which node >/dev/null; then
echo "Nodejs is already installed"
else
if [ $(uname) == "Darwin" ]; then
brew install node
else
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
fi
fi
# install python
if which python3 >/dev/null; then
echo "Python3 is already installed"
else
if [ $(uname) == "Darwin" ]; then
brew install python3
else
sudo apt-get -y install python3-dev python3-pip python3-setuptools build-essential
fi
fi
# install pip modules
if python3 -m pip show spacy socketIO-client >/dev/null; then
echo "Pip modules already installed"
else
python3 -m pip install -U socketIO-client
python3 -m pip install -U spacy
python3 -m spacy.en.download
fi
# install npm modules
if [ -d ./node_modules ]; then
echo "Npm modules already installed"
else
npm install
fi
# install neo4j
if which neo4j >/dev/null; then
echo "Neo4j is already installed"
else
if [ $(uname) == "Darwin" ]; then
brew install neo4j
else
wget -O - https://debian.neo4j.org/neotechnology.gpg.key | sudo apt-key add -
echo 'deb http://debian.neo4j.org/repo stable/' | sudo tee /etc/apt/sources.list.d/neo4j.list
sudo apt-get update
sudo apt-get -y install neo4j
fi
fi
# start neo4j
UP=$(pgrep neo4j | wc -l);
if [ "$UP" -eq 0 ];
then
if [ $(uname) == "Darwin" ]; then
neo4j start
else
service neo4j start
fi
else
echo "Neo4j is already started"
fi
# copy keys file if not already exist
# BIN_DIR=`pwd`/bin
# $BIN_DIR/copy-config