#!/bin/bash # cfupdate - convert a crossfire maps hierarchy to html # Copyright (C) 2005 Marc Lehmann # # CFUPDATE is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with gvpe; if not, write to the Free Software # Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA umask 022 PATH=/root/src/crossfire:$PATH BASE=/var/www/cfmaps.schmorp.de export CROSSFIRE_LIBDIR=$BASE/lib cd "$BASE" || exit 69 VERSION=1.01 cvs -Q -z3 update -AdP | grep -v ^\\? rm -f .cfmap2html find . -name CVS -prune -o -type d -printf "%P/\n" | while read dir; do ( export dir cd "./$dir" || exit 68 { echo "Crossfire Maps Directory \"$dir\"

Crossfire Maps Directory \"$dir\"

This Directory

" >&7 cat <&7

Bookmarks


created by update version $VERSION

EOF echo "" >&7 } 7>index.html ) done <.cfmap2html xargs cfmap2html rm -f .cfmap2html cfarch2html cfworldmap chown -R root.root . chmod -R u=rwX,go=rX .