#!/bin/sh

# default the major version number (the number of complete chapters)
MAJOR=13

# increment the minor version.

if [ ! -f .version ]; then \
	echo 1 > .version; \
else \
	expr 0`cat .version` + 1 > .version; \
fi

# and rebuild version.tex

echo "\def\bookversion{DRAFT, Version 0.1-"$MAJOR"("`cat .version`")}" > version.tex
