Merge pull request #24 from dirtbags/nodocker

add: script to bootstrap a devel server
This commit is contained in:
pi-rho 2017-11-14 15:44:58 -07:00 committed by GitHub
commit 480ec594f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 27 additions and 0 deletions

27
devel.sh Executable file
View File

@ -0,0 +1,27 @@
#!/bin/sh
#
# Script to clone and start a development server
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.
$ mkdir /tmp/moth
$ cd /tmp/moth
$ curl https://raw.githubusercontent.com/dirtbags/moth/master/devel.sh | sh
EOM
exit 1
fi
[ -d puzzles ] || mkdir -p puzzles
[ -d moth/bin ] || git clone https://github.com/dirtbags/moth.git
cd moth
puzzles="$(readlink -e ../puzzles)"
ln -sf "${puzzles}" puzzles
printf "\n[+] Place puzzles at ${puzzles} ...\n"
python3 tools/devel-server.py