Commit 6e94f20b by William Tisäter

Always run build.sh from repository root

parent b1790797
...@@ -3,29 +3,31 @@ ...@@ -3,29 +3,31 @@
function warning { echo "Warning: $1"; } function warning { echo "Warning: $1"; }
function error { echo "Error: $1" 1>&2; exit 1; } function error { echo "Error: $1" 1>&2; exit 1; }
if [ -z "$(virtualenv --version)" ]; then pushd $(dirname $0)
error "Missing virtualenv binary" if [ -z "$(virtualenv --version)" ]; then
fi error "Missing virtualenv binary"
fi
if [ ! -d venv ]; then if [ ! -d venv ]; then
virtualenv venv || error "virtualenv failed" virtualenv venv || error "virtualenv failed"
venv/bin/pip install tox nose epydoc || error "pip failed" venv/bin/pip install tox nose epydoc || error "pip failed"
fi fi
if [ ! -d tests/data ]; then if [ ! -d tests/data ]; then
pushd tests pushd tests
wget http://www.defunct.cc/maxmind-geoip-samples.tar.gz wget http://www.defunct.cc/maxmind-geoip-samples.tar.gz
tar -zxvf maxmind-geoip-samples.tar.gz tar -zxvf maxmind-geoip-samples.tar.gz
unlink maxmind-geoip-samples.tar.gz unlink maxmind-geoip-samples.tar.gz
popd popd
fi fi
venv/bin/tox || error "tox failed" venv/bin/tox || error "tox failed"
venv/bin/epydoc --config=epydoc.ini --no-private || error "epydoc failed" venv/bin/epydoc --config=epydoc.ini --no-private || error "epydoc failed"
if [ -z "$(pandoc --version)" ]; then if [ -z "$(pandoc --version)" ]; then
warning "Skipping Markdown to reStructuredText translation" warning "Skipping Markdown to reStructuredText translation"
else else
pandoc -f markdown -t rst -o README.rst README.md || error "pandoc failed" pandoc -f markdown -t rst -o README.rst README.md || error "pandoc failed"
fi fi
popd
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment