3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-26 04:32:37 +01:00
dbot/install
2014-09-02 18:58:32 +01:00

49 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
cat LICENCE
git submodule init
git submodule update
if [ ! -e /usr/bin/node ] && [ ! -e /usr/local/bin/node ];
then
echo 'node.js is not installed. Please install it before running install.sh.'
exit 1
fi
if [ ! -e /usr/bin/npm ] && [ ! -e /usr/local/bin/npm ];
then
echo 'npm is not installed. Please install it before running install.sh'
exit 1
fi
npm install feedparser node-units tvdb crypto-js 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
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
unzip bootstrap-3.2.0-dist.zip
rm bootstrap.zip
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
cd ../..
if [ ! -f config.json ];
then
echo 'Creating configuration file...'
cp config.json.sample config.json
vim config.json
fi
read -p "Setup complete. Run depressionbot now? [y/N]"
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
echo 'Okay. To run the bot, use "node run.js"'
exit
fi
node run.js