Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Simplify use of Bash script for setup #5

Merged
merged 2 commits into from

2 participants

@solidsnack

These are some small changes that make the script easier to use (no need for users to set the diagnostic messages) and less error prone (it is just as well to quote variable references that users control).

@snoyberg
Owner

Looks good. I'll admit to a lack of real Bash-fu on my part :).

@snoyberg snoyberg merged commit 855ae91 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 3 deletions.
  1. +1 −1  README.md
  2. +3 −2 setup-keter.sh
View
2  README.md
@@ -4,7 +4,7 @@ Deployment system for Yesod (and other Haskell) web apps.
Do get Keter up-and-running quickly on an Ubuntu system, run:
- wget -O - https://raw.github.com/snoyberg/keter/master/setup-keter.sh | bash -ex
+ wget -O - https://raw.github.com/snoyberg/keter/master/setup-keter.sh | bash
(Note: you may need to run the above command twice, if the shell exits after
`apt-get` but before running the rest of its instructions.) This will download
View
5 setup-keter.sh
@@ -1,4 +1,5 @@
-#!/bin/bash -ex
+#!/bin/bash
+set -o errexit -o nounset -o xtrace
sudo apt-get install postgresql haskell-platform
@@ -39,4 +40,4 @@ sudo mv /tmp/keter.conf /etc/init
sudo start keter
sudo mkdir -p /opt/keter/incoming
-sudo chown $USER /opt/keter/incoming
+sudo chown "$USER" /opt/keter/incoming
Something went wrong with that request. Please try again.