2013-01-26 22:51:57 +01:00
|
|
|
#!/bin/bash
|
2013-01-30 15:57:36 +01:00
|
|
|
cat LICENCE
|
2013-01-26 22:51:57 +01:00
|
|
|
git submodule init
|
|
|
|
git submodule update
|
|
|
|
|
2013-03-19 06:16:26 +01:00
|
|
|
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
|
|
|
|
|
2013-07-25 20:18:11 +02:00
|
|
|
npm install async wordnik node-uuid underscore request sandbox express moment jade databank databank-redis ent
|
2013-01-26 22:51:57 +01:00
|
|
|
|
|
|
|
cd public/
|
|
|
|
wget http://twitter.github.com/bootstrap/assets/bootstrap.zip
|
|
|
|
unzip bootstrap.zip
|
|
|
|
rm bootstrap.zip
|
|
|
|
|
|
|
|
mkdir d3
|
|
|
|
cd d3
|
|
|
|
wget http://d3js.org/d3.v3.zip
|
|
|
|
unzip d3.v3.zip
|
|
|
|
rm d3.v3.zip
|
|
|
|
|
2013-01-30 15:57:36 +01:00
|
|
|
cd ../..
|
|
|
|
|
|
|
|
if [ ! -f config.json ];
|
|
|
|
then
|
|
|
|
echo 'Creating configuration file...'
|
|
|
|
cp config.json.sample config.json
|
|
|
|
vim config.json
|
|
|
|
fi
|
2013-01-26 22:51:57 +01:00
|
|
|
|
2013-01-30 15:57:36 +01:00
|
|
|
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
|
2013-01-26 22:51:57 +01:00
|
|
|
|