2013-08-31 03:14:18 +02:00
|
|
|
#!/bin/bash
|
|
|
|
cat LICENCE
|
|
|
|
git submodule init
|
|
|
|
git submodule update
|
|
|
|
|
2017-07-22 04:44:46 +02:00
|
|
|
command -v node > /dev/null
|
|
|
|
if [[ $? -gt 0 ]]; then
|
2013-08-31 03:14:18 +02:00
|
|
|
echo 'node.js is not installed. Please install it before running install.sh.'
|
|
|
|
exit 1
|
|
|
|
fi
|
2017-07-22 04:44:46 +02:00
|
|
|
command -v npm > /dev/null
|
|
|
|
if [[ $? -gt 0 ]]; then
|
2013-08-31 03:14:18 +02:00
|
|
|
echo 'npm is not installed. Please install it before running install.sh'
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2021-08-08 15:27:05 +02:00
|
|
|
npm install googlemaps humanize feedparser node-units tvdb method-override 500px process async wordnik node-uuid underscore request request-promise-native vm2 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/
|
2015-01-24 19:19:40 +01:00
|
|
|
wget https://github.com/twbs/bootstrap/releases/download/v3.3.2/bootstrap-3.3.2-dist.zip
|
|
|
|
unzip bootstrap-3.3.2-dist.zip
|
|
|
|
mv bootstrap-3.3.2-dist bootstrap
|
|
|
|
rm bootstrap-3.3.2-dist.zip
|
2013-08-31 03:14:18 +02:00
|
|
|
|
|
|
|
mkdir d3
|
|
|
|
cd d3
|
2015-02-28 17:54:43 +01:00
|
|
|
wget https://github.com/mbostock/d3/releases/download/v3.5.5/d3.zip
|
2014-09-02 19:53:36 +02:00
|
|
|
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
|
2015-01-24 19:19:40 +01:00
|
|
|
$EDITOR config.json # Open config file with EDITOR variable, but if not available:
|
|
|
|
if [[ $? != 0 ]]; then vim config.json; fi # Find the return code from previous command, if failed then use vim to edit.
|
2013-08-31 03:14:18 +02:00
|
|
|
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
|
|
|
|
|