-
Notifications
You must be signed in to change notification settings - Fork 24
/
install.sh
executable file
·34 lines (29 loc) · 1012 Bytes
/
install.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
echo "Installing Ethersheet"
if [ ! `which node` ] && [ ! `which nodejs` ]; then
echo "You need to install nodejs for your platform! Install it via your package manager or at https://nodejs.org"
exit 1
fi
if ! [ `which npm` ]; then
echo "You need to install npm for your platform! Install it via your package manager or at https://www.npmjs.com"
exit 1
fi
if ! [ `which mysql` ]; then
echo "You need to install mysql for your platform! Install it via your package manager or at https://www.mysql.com"
exit 1
fi
echo "creating config.js"
cp ./examples/config-example.js config.js
echo
read -p "press enter to edit config.js" CONT
echo
if [ `which $VISUAL` ]; then
$VISUAL config.js
elif [ `which gedit` ]; then
gedit config.js
elif [ `which vim` ]; then
vim config.js
else
echo "ERROR: Can't find an editor, you need to edit config.js and put in your settings"
fi
echo "Congratulations! You have installed ethersheet! Now run 'npm start' and point your browser to localhost:8080"
exit 0