#!/bin/sh
# Create a zip file containing the Mathomatic source distribution with no object files.
# The current directory must be the Mathomatic build directory for this to work.
# Uses Info-ZIP and its command line options.

if [ ! -f "VERSION" ]
then
	echo 'zipsrc executed from an improper directory;'
	echo 'Must only be invoked as "./zipsrc" from the Mathomatic source directory.'
	exit 1
fi

rm -f ~/am.zip */*.o */*.pyc
echo Mathomatic development source code version `cat VERSION`+ \
| zip -9rqzX ~/am.zip *.c *.h makefile* makehtmlcard* makepdfsheet* t update compile* *.txt VERSION AUTHORS COPYING mathomatic.1 rmath.1 zipsrc doc primes tests lib examples m4 misc icons menu \
&& echo ~/am.zip created.
