|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- #!/bin/sh
-
- package='tufte-latex'
- class='tufte-handout.cls'
-
- set -e # exit on first error
-
- if test $# -ne 1; then
- echo "usage: $0 VERSION"
- exit 1
- fi
-
- version=$1
-
- if ! echo $version | grep -E "^[0-9]+\.[0-9]+\.[0-9]+$"
- then
- echo "VERSION should be of the form 1.2.5 (major.minor.revision)"
- exit 1
- fi
-
- if ! grep -q $version $class
- then
- echo "Error: version skew. '$version' does not match that in class"
- grep -H ProvidesClass $class
- exit 1
- fi
-
- date=`date +%Y/%m/%d`
-
- if ! grep -q $date $class
- then
- echo "Error: date skew. '$date' does not match that in class"
- grep -H ProvidesClass $class
- exit 1
- fi
-
- if ! grep -q $version History.txt
- then
- echo "Error: no release notes for '$version' found in History.txt"
- grep -H $version History.txt
- exit 1
- fi
-
- history_date=`date +%Y-%m-%d`
-
- if ! grep -q $history_date History.txt
- then
- echo "Error: '$history_date' not found in History.txt"
- grep -H $history_date History.txt
- exit 1
- fi
-
- # Refresh sample document
-
- pdflatex sample-handout > refresh-sample.log
- bibtex sample-handout >> refresh-sample.log
- pdflatex sample-handout >> refresh-sample.log
- pdflatex sample-handout >> refresh-sample.log
- rm -f sample-handout.{aux,log,out} refresh-sample.log
-
- # Make bundle
-
- mkdir -p pkg/$package-$version
- tar cf - `cat Manifest.txt` | ( cd pkg/$package-$version && tar xf - )
- zip -rq pkg/$package-$version.zip pkg/$package-$version
-
- cat << MESSAGE
-
- `openssl dgst -sha1 pkg/$package-$version.zip`
-
- Don't forget to tag (after committing changes),
-
- svn cp -m'To tag release $version.' \\
- https://$package.googlecode.com/svn/trunk \\
- https://$package.googlecode.com/svn/tags/rel_$version
-
- and upload,
-
- http://code.google.com/p/$package/downloads/list
- http://ctan.org/upload
-
- MESSAGE
|