cgal/Maintenance/release_building/print_release_page

125 lines
2.7 KiB
Bash
Executable File

#!/bin/sh
#
CURRENT_DIR=`pwd`
DATE=`date "+Last modified: %d %b %Y"`
WWWDIR="/users/www/CGAL/Members/Develop/updates"
TEMPPAGE="$WWWDIR/temp.html"
WWWPAGE="$WWWDIR/index.html"
SCRIPTDIR="/projects/CGAL/admin_scripts"
DATA_DIR=${SCRIPTDIR}/DATA
print_header()
{
echo "<H1>CGAL Internal Release Page</H1>"
echo "This page contains the latest internal release of CGAL"
echo "<HR>"
}
print_newrelease()
{
cat <<"EOF"
<H2><A NAME="downloading">Downloading</A></H2>
Download the latest internal release:
EOF
echo "<FONT SIZE=\"+1\"> <A HREF="
echo "\"http://www.cs.uu.nl/CGAL/Members/Develop/updates/$RELEASE.tar.gz\">"
echo "$RELEASE.tar.gz</A></FONT> ."
if [ -r "$PATCHFILE" ]
then
echo "";
echo "Or get the <A href=\"diffs_$RELEASE.gz\">patches</A> from the previous release ($PREV_RELEASE)"
fi
echo '<H2><A NAME="differences">Differences</A></H2>'
echo "The differences of release $RELEASE with respect to release $PREV_RELEASE are:"
if [ -s $DATA_DIR/new_packages ]
then
echo "<PRE>"
echo "<H3>New packages</H3>"
cat $DATA_DIR/new_packages
echo "</PRE>"
fi
if [ -s $DATA_DIR/new_versions ]
then
echo "<PRE>"
echo "<H3>New versions of existing packages</H3>"
cat $DATA_DIR/new_versions
echo "</PRE>"
fi
if [ -s $DATA_DIR/removed_packages ]
then
echo "<PRE>"
echo "<H3>Packages that were removed</H3>"
cat $DATA_DIR/removed_packages
echo "</PRE>"
fi
echo '<H2><A NAME="versions">Versions</A></H2>'
echo "For release $RELEASE the following packages have been used:"
cat <<"EOF"
<PRE>
Package Version
------- -------
EOF
cat $DATA_DIR/latest_versions
echo '</PRE>'
cat <<"EOF"
EOF
echo ''
echo '<HR>'
}
print_index()
{
cat << EOF
<OL>
<LI><A HREF="#downloading">Download this release</A> </LI>
<LI><A HREF="#differences">Differences with previous release</A> </LI>
<LI><A HREF="#versions">Versions used in this release</A> </LI>
<LI><A HREF="packages.html">Recent submissions page</A> </LI>
</OL>
<HR>
EOF
}
if [ ! -r $DATA_DIR/version_info ]; then
echo "Cannot open file $DATA_DIR/version_info"
exit 1;
fi
read RELEASE PREV_RELEASE < $DATA_DIR/version_info
RELEASE_SIZE="2.6 Mb"
rm -f $TEMPPAGE
RESULTDIR=/users/www/CGAL/Members/Develop/testsuite/${RELEASE}
RESULTPAGE=${RESULTDIR}/announce.html
PATCHFILE=${RESULTDIR}/diffs_${RELEASE}.gz
echo "patchfile: $PATCHFILE"
$SCRIPTDIR/print_cgal_header "CGAL Internal Release Page" > $TEMPPAGE
print_header >> $TEMPPAGE
print_index >> $TEMPPAGE
print_newrelease >> $TEMPPAGE
$SCRIPTDIR/print_cgal_trailer >> $TEMPPAGE
echo "creating file $RESULTPAGE ..." >&2
cp $TEMPPAGE $RESULTPAGE
chmod 664 $RESULTPAGE
chgrp cgal $RESULTPAGE
echo "creating file $WWWPAGE ..." >&2
rm -f $WWWPAGE
mv $TEMPPAGE $WWWPAGE
chmod 664 $WWWPAGE
chgrp cgal $WWWPAGE