posixify devel.sh in case someone wants to run this on a wristwatch or a poorly designed box that doesn't have modern bash

This commit is contained in:
pi-rho 2017-09-15 10:18:13 -06:00
parent e48bcee956
commit 163742029c
1 changed files with 6 additions and 4 deletions

View File

@ -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 <<EOM
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.
@ -14,8 +16,8 @@ EOM
exit 1
fi
[[ -d puzzles ]] || mkdir -p puzzles
[[ -d moth/bin ]] || git clone https://github.com/dirtbags/moth.git
[ -d puzzles ] || mkdir -p puzzles
[ -d moth/bin ] || git clone https://github.com/dirtbags/moth.git
cd moth
puzzles="$(readlink -e ../puzzles)"