2017-09-15 10:18:13 -06:00
|
|
|
#!/bin/sh
|
2017-09-11 14:50:57 -06:00
|
|
|
#
|
|
|
|
# Script to clone and start a development server
|
|
|
|
|
2017-09-15 10:18:13 -06:00
|
|
|
set -e
|
|
|
|
|
|
|
|
if [ -f tools/devel-server.py ]; then
|
2017-09-11 14:50:57 -06:00
|
|
|
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
|
2017-09-15 10:14:01 -06:00
|
|
|
$ cd /tmp/moth
|
2017-09-15 10:27:53 -06:00
|
|
|
$ curl https://raw.githubusercontent.com/dirtbags/moth/master/devel.sh | sh
|
2017-09-11 14:50:57 -06:00
|
|
|
EOM
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2017-09-15 10:18:13 -06:00
|
|
|
[ -d puzzles ] || mkdir -p puzzles
|
|
|
|
[ -d moth/bin ] || git clone https://github.com/dirtbags/moth.git
|
2017-09-11 14:50:57 -06:00
|
|
|
|
|
|
|
cd moth
|
|
|
|
puzzles="$(readlink -e ../puzzles)"
|
|
|
|
ln -sf "${puzzles}" puzzles
|
|
|
|
|
|
|
|
printf "\n[+] Place puzzles at ${puzzles} ...\n"
|
|
|
|
python3 tools/devel-server.py
|