2008-05-02 22:19:38 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
report_failure ()
|
|
|
|
{
|
|
|
|
echo " **** failed to complete **** "
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
./testenv || report_failure
|
|
|
|
|
|
|
|
./makedocs snapshot || exit 1
|
|
|
|
|
2010-01-14 08:00:12 +08:00
|
|
|
REVNUM_FILE=.logger_revnum
|
2008-05-02 22:19:38 +08:00
|
|
|
|
|
|
|
|
2010-01-14 08:00:12 +08:00
|
|
|
rm -rf release/* || report_failure
|
2008-05-02 22:19:38 +08:00
|
|
|
|
|
|
|
|
2008-05-04 11:41:55 +08:00
|
|
|
DLIB_REPOS=`svn info | grep URL | awk '{print $2}' | sed -e 's/\/docs$//' `
|
2008-05-02 22:19:38 +08:00
|
|
|
|
|
|
|
|
2010-01-14 08:00:12 +08:00
|
|
|
REVISION=`svn info | grep Revision | awk '{ print $2 }'`
|
|
|
|
|
|
|
|
svn log -v -r $REVISION:`cat $REVNUM_FILE` $DLIB_REPOS/dlib > release/change_log.txt || report_failure
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-05-02 22:19:38 +08:00
|
|
|
|
|
|
|
cd release || report_failure
|
2010-01-14 08:00:12 +08:00
|
|
|
|
|
|
|
|
2008-05-02 22:19:38 +08:00
|
|
|
RELDIR=`echo dlib_snapshot-rev$REVISION`
|
|
|
|
mkdir $RELDIR
|
|
|
|
cd $RELDIR || report_failure
|
|
|
|
cp -r ../../docs/cache/dlib . || report_failure
|
|
|
|
cp -r ../../docs/cache/examples . || report_failure
|
|
|
|
|
|
|
|
echo This copy of dlib C++ library is a developmental snapshot. >> dlib/README.txt
|
2010-02-06 04:51:34 +08:00
|
|
|
echo "Date: `date`" >> dlib/README.txt
|
2008-05-02 22:19:38 +08:00
|
|
|
echo Subversion Revision Number: $REVISION >> dlib/README.txt
|
|
|
|
|
|
|
|
|
|
|
|
SOURCE_ZIP=`echo $RELDIR.zip`
|
|
|
|
SOURCE_TAR=`echo $RELDIR.tar`
|
|
|
|
tar -C ../../docs/chm -cf - docs/ documentation.html --exclude=".svn" | tar -xf -
|
|
|
|
cd .. || report_failure
|
|
|
|
|
|
|
|
tar -cf $SOURCE_TAR $RELDIR
|
|
|
|
# flip everything to MS-DOS line endings
|
|
|
|
find $RELDIR -name "*.cpp" -or -name "*.h" -or -name "*.txt" -or -name "*.html" | xargs flip -m
|
|
|
|
zip -r9 $SOURCE_ZIP $RELDIR > /dev/null
|
|
|
|
bzip2 $SOURCE_TAR
|
|
|
|
|
|
|
|
rm -rf $RELDIR
|
|
|
|
|
2008-11-11 09:48:39 +08:00
|
|
|
|
|
|
|
# make an index.html with links to the snapshot archives and chm file
|
2010-01-14 08:00:12 +08:00
|
|
|
#echo "<html><body>" > index.html
|
|
|
|
#echo "<a href='$SOURCE_ZIP'>$SOURCE_ZIP</a><br/>" >> index.html
|
|
|
|
#echo "<a href='$SOURCE_TAR.bz2'>$SOURCE_TAR.bz2</a><br/>" >> index.html
|
|
|
|
#echo "<a href='dlib_documentation_snapshot-rev$REVISION.chm'>dlib_documentation_snapshot-rev$REVISION.chm</a><br/>" >> index.html
|
|
|
|
#echo "</body></html>" >> index.html
|
2008-11-11 09:48:39 +08:00
|
|
|
|
|
|
|
|
|
|
|
# finally, generate the chm help file
|
2008-05-02 22:19:38 +08:00
|
|
|
wine ../docs/chm/htmlhelp/hhc.exe ../docs/chm/lib.hhp
|
|
|
|
mv ../docs/chm/help.chm dlib_documentation_snapshot-rev$REVISION.chm
|
|
|
|
|
|
|
|
|