forked from GitHub/dbot
Further automate the install script
* config.json is now created in the correct location * config.json is only created if it doesn't already exist * vim launches to edit config.json on first install * User is prompted to run depressionbot directly from the script
This commit is contained in:
parent
eb7a958352
commit
a130c3e744
18
install.sh
18
install.sh
@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
cat LICENCE
|
||||||
git submodule init
|
git submodule init
|
||||||
git submodule update
|
git submodule update
|
||||||
|
|
||||||
@ -16,8 +16,20 @@ wget http://d3js.org/d3.v3.zip
|
|||||||
unzip d3.v3.zip
|
unzip d3.v3.zip
|
||||||
rm d3.v3.zip
|
rm d3.v3.zip
|
||||||
|
|
||||||
cd ..
|
cd ../..
|
||||||
|
|
||||||
|
if [ ! -f config.json ];
|
||||||
|
then
|
||||||
|
echo 'Creating configuration file...'
|
||||||
cp config.json.sample config.json
|
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
|
||||||
|
|
||||||
echo 'Setup complete. Now edit config.json with your preferences and run the bot with "node run.js"'
|
|
||||||
|
Loading…
Reference in New Issue
Block a user