3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-23 12:29:26 +01:00
dbot/install

50 lines
1.4 KiB
Plaintext
Raw Normal View History

2013-08-31 03:14:18 +02:00
#!/bin/bash
cat LICENCE
git submodule init
git submodule update
2014-09-11 21:21:16 +02:00
if [ ! -e /usr/bin/node ] && [ ! -e /usr/local/bin/node ] && [ ! -e /usr/local/bin/node ] && [ ! -e /usr/sbin/node ];
2013-08-31 03:14:18 +02:00
then
echo 'node.js is not installed. Please install it before running install.sh.'
exit 1
fi
2014-09-11 21:21:16 +02:00
if [ ! -e /usr/bin/npm ] && [ ! -e /usr/local/bin/npm ] && [ ! -e /usr/sbin/npm ];
2013-08-31 03:14:18 +02:00
then
echo 'npm is not installed. Please install it before running install.sh'
exit 1
fi
2015-01-08 19:06:20 +01:00
npm install googlemaps feedparser node-units tvdb crypto-js method-override 500px process async wordnik node-uuid underscore request sandbox express moment-timezone moment jade databank databank-redis ent passport passport-local password-hash connect-flash
2013-08-31 03:14:18 +02:00
cd public/
#wget http://twitter.github.com/bootstrap/assets/bootstrap.zip
wget https://github.com/twbs/bootstrap/releases/download/v3.2.0/bootstrap-3.2.0-dist.zip
2014-09-02 19:58:32 +02:00
unzip bootstrap-3.2.0-dist.zip
2014-10-27 18:07:04 +01:00
mv bootstrap-3.2.0-dist bootstrap
rm bootstrap-3.2.0-dist.zip
2013-08-31 03:14:18 +02:00
mkdir d3
cd d3
#wget http://d3js.org/d3.v3.zip
wget https://github.com/mbostock/d3/releases/download/v3.4.11/d3.zip
unzip d3.zip
rm d3.zip
2013-08-31 03:14:18 +02:00
cd ../..
if [ ! -f config.json ];
then
echo 'Creating configuration file...'
cp config.json.sample config.json
vim config.json
fi
2014-09-11 21:21:16 +02:00
read -p "Setup complete. Run dbot now? [y/N]"
2013-08-31 03:14:18 +02:00
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
echo 'Okay. To run the bot, use "node run.js"'
exit
fi
node run.js