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 6e68405b6b
commit eda944c2e1
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 # 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 cat <<EOM
This script is intended to be used to bootstrap a moth development server. It 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. looks like you're running the script from a moth repository working directory.
@ -14,8 +16,8 @@ EOM
exit 1 exit 1
fi fi
[[ -d puzzles ]] || mkdir -p puzzles [ -d puzzles ] || mkdir -p puzzles
[[ -d moth/bin ]] || git clone https://github.com/dirtbags/moth.git [ -d moth/bin ] || git clone https://github.com/dirtbags/moth.git
cd moth cd moth
puzzles="$(readlink -e ../puzzles)" puzzles="$(readlink -e ../puzzles)"