From 30dbcc306c0d3181792e3dd20d340d77b8834830 Mon Sep 17 00:00:00 2001 From: pi-rho Date: Mon, 11 Sep 2017 14:50:57 -0600 Subject: [PATCH 1/4] add: script to bootstrap a devel server --- devel.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 devel.sh diff --git a/devel.sh b/devel.sh new file mode 100755 index 0000000..f930024 --- /dev/null +++ b/devel.sh @@ -0,0 +1,25 @@ +#!/bin/bash -e +# +# Script to clone and start a development server + +if [[ -f tools/devel-server.py ]]; then + cat < Date: Fri, 15 Sep 2017 10:14:01 -0600 Subject: [PATCH 2/4] tab fix --- devel.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devel.sh b/devel.sh index f930024..86675e9 100755 --- a/devel.sh +++ b/devel.sh @@ -8,8 +8,8 @@ This script is intended to be used to bootstrap a moth development server. It looks like you're running the script from a moth repository working directory. $ mkdir /tmp/moth - $ cd /tmp/moth - $ curl https://raw.githubusercontent.com/dirtbags/moth/master/devel.sh | bash + $ cd /tmp/moth + $ curl https://raw.githubusercontent.com/dirtbags/moth/master/devel.sh | bash EOM exit 1 fi From eda944c2e1bcfb1e7d34cce33c7b0b9f1f6824db Mon Sep 17 00:00:00 2001 From: pi-rho Date: Fri, 15 Sep 2017 10:18:13 -0600 Subject: [PATCH 3/4] posixify devel.sh in case someone wants to run this on a wristwatch or a poorly designed box that doesn't have modern bash --- devel.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/devel.sh b/devel.sh index 86675e9..d79d263 100755 --- a/devel.sh +++ b/devel.sh @@ -1,8 +1,10 @@ -#!/bin/bash -e +#!/bin/sh # # Script to clone and start a development server -if [[ -f tools/devel-server.py ]]; then +set -e + +if [ -f tools/devel-server.py ]; then cat < Date: Fri, 15 Sep 2017 10:27:53 -0600 Subject: [PATCH 4/4] update usage message --- devel.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devel.sh b/devel.sh index d79d263..c00b479 100755 --- a/devel.sh +++ b/devel.sh @@ -11,7 +11,7 @@ looks like you're running the script from a moth repository working directory. $ mkdir /tmp/moth $ cd /tmp/moth - $ curl https://raw.githubusercontent.com/dirtbags/moth/master/devel.sh | bash + $ curl https://raw.githubusercontent.com/dirtbags/moth/master/devel.sh | sh EOM exit 1 fi