#!/bin/sh # CURRENT_DIR=`pwd` DATE=`date "+Last modified: %d %b %Y"` WWWDIR="/users/www/CGAL/Members/Develop/updates" TEMPPAGE="$WWWDIR/temp.html" LOCKFILE="$WWWDIR/create_packages_html.lock" NEW_PACKAGES_NAME="packages.html" OLD_PACKAGES_NAME="old_packages.html" NEW_PACKAGES_PAGE="$WWWDIR/$NEW_PACKAGES_NAME" OLD_PACKAGES_PAGE="$WWWDIR/$OLD_PACKAGES_NAME" SCRIPTDIR="/projects/CGAL/admin_scripts" RESULTDIR=/users/www/CGAL/Members/Develop/updates/testsuite list_compressed_files() { /bin/ls -l | awk '/(.*\.tar\.gz$)|(.*\.zip$)/ { print $9 }' } print_new_header() { echo "

CGAL Packages Page

" echo "This page contains the most recent submissions for CGAL" echo "
" } print_old_header() { echo "

CGAL Packages Page

" echo "This page contains old submissions for CGAL" echo "
" } #print_table
print_table() { DIRNAME=`basename $1` cd $1 echo "
" echo "" echo "" echo "" echo "" echo "" echo "" echo "" echo "" echo "" echo "" echo "" echo "" for PACKAGE_DIR in `ls`; do if [ -d $PACKAGE_DIR ] ; then cd $PACKAGE_DIR echo "" echo "" echo "" echo "" echo "" echo "" echo "" echo "" cd .. fi done echo "
"$2"
PackageVersionDocumentationLCDescription
" for FILE in `list_compressed_files` ; do echo "`basename $FILE .zip`" done echo "" if [ -f version ] ; then ${SCRIPTDIR}/format_cgal_version version else echo "version not available" fi echo "" if [ -d "doc_ps" ] ; then PSFILES=`find doc_ps \( -name *.ps -o -name *.ps.gz \) -type f -print` if [ ! -z "$PSFILES" ] ; then for FILE in $PSFILES ; do echo "`basename $FILE`
" done else echo "not available" fi else echo "not available" fi echo "
" if [ -f long_description.txt ] ; then echo "L" else echo "-" fi echo "" if [ -f changes.txt ] ; then echo "C" else echo "-" fi echo "" if [ -f description.txt ] ; then cat description.txt else echo "description not available" fi echo "
" echo "
" echo "
" } print_recent_submissions() { cat << EOF

Recent submissions

The table below contains all packages that have been submitted to cgal-submit@cs.ruu.nl. The format of these packages is described on the CGAL Submission Rules Page. The test results can be found on the CGAL Test Suite Result Page.

EOF print_table "$WWWDIR/packages" "Recent submissions for CGAL" } print_old_submissions() { echo "

Old submissions

" print_table "$WWWDIR/old_packages" "Old submissions" } print_new_index() { cat << EOF
  1. Recent submissions
  2. The latest internal release

EOF #
  • Old submissions
  • } print_old_index() { cat << EOF
    1. Old submissions
    2. Recent submissions

    EOF } if /sw/bin/lockfile -r 10 -l 200 $LOCKFILE; then /bin/rm -f $TEMPPAGE echo "creating file $NEW_PACKAGES_PAGE ..." $SCRIPTDIR/print_cgal_header "CGAL Internal Release Page" > $TEMPPAGE print_new_header >> $TEMPPAGE print_new_index >> $TEMPPAGE print_recent_submissions >> $TEMPPAGE $SCRIPTDIR/print_cgal_trailer >> $TEMPPAGE /bin/mv $TEMPPAGE $NEW_PACKAGES_PAGE chmod 664 $NEW_PACKAGES_PAGE chgrp cgal $NEW_PACKAGES_PAGE #/bin/rm -f $TEMPPAGE #echo "creating file $OLD_PACKAGES_PAGE ..." $SCRIPTDIR/print_cgal_header "CGAL Internal Release Page" > $TEMPPAGE #print_old_header >> $TEMPPAGE #print_old_index >> $TEMPPAGE #print_old_submissions >> $TEMPPAGE #$SCRIPTDIR/print_cgal_trailer >> $TEMPPAGE #/bin/mv $TEMPPAGE $OLD_PACKAGES_PAGE #chmod 664 $OLD_PACKAGES_PAGE #chgrp cgal $OLD_PACKAGES_PAGE rm -f $LOCKFILE fi