From f30ed08b3e1c15239c0277e83b7c37da5134bf33 Mon Sep 17 00:00:00 2001 From: David Trail Date: Thu, 2 Oct 2014 20:00:15 +0100 Subject: [PATCH] Install script. --- README.rst | 2 ++ install.sh | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100755 install.sh diff --git a/README.rst b/README.rst index df65942..ad656af 100644 --- a/README.rst +++ b/README.rst @@ -18,6 +18,8 @@ The way I personally install Shreddit is via a handy tool called `virtualenv` wh 5. Copy `shreddit.cfg.example` to something else and edit it to your liking. 6. Run `python shreddit.py -c YOUR_CONFIG_FILE.cfg`. +Alternatively try to run `./install.sh` and it will attempt to do it all for you. + Notes: - The script *does* work with Python versions 2 and 3 but people often get in a mess with pip versions, python versions and virtulenv versions. Make sure that your Python/pip/virtualenv are all the same version. If you ran the above code it *should* work as stated. diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..dcc4040 --- /dev/null +++ b/install.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env sh + +virtualenv . +source ./bin/activate +pip install -r requirements.txt + +if [ ! -f "shreddit.cfg" ]; then + cp "shreddit.cfg.example" "shreddit.cfg" + $EDITOR shreddit.cfg +fi +