ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cfmaps/cfupdate
(Generate patch)

Comparing cfmaps/cfupdate (file contents):
Revision 1.5 by root, Fri Nov 18 23:43:12 2005 UTC vs.
Revision 1.6 by root, Sun Nov 20 00:58:57 2005 UTC

1#!/bin/bash 1#!/bin/bash
2
3# cfupdate - convert a crossfire maps hierarchy to html
4# Copyright (C) 2005 Marc Lehmann <gvpe@schmorp.de>
5#
6# CFUPDATE is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with gvpe; if not, write to the Free Software
18# Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2 19
3umask 022 20umask 022
4 21
5PATH=/root/src/crossfire:$PATH 22PATH=/root/src/crossfire:$PATH
6BASE=/var/www/cfmaps.schmorp.de 23BASE=/var/www/cfmaps.schmorp.de
17find . -name CVS -prune -o -type d -printf "%P/\n" | while read dir; do 34find . -name CVS -prune -o -type d -printf "%P/\n" | while read dir; do
18 ( 35 (
19 export dir 36 export dir
20 cd "./$dir" || exit 68 37 cd "./$dir" || exit 68
21 { 38 {
22 echo "<html><head><title>Crossfire Maps Directory \"$dir\"</title></head><body><h1>Crossfire Maps Directory \"$dir\"</h1><h2>This Directory</h2><ul>" >&7 39 echo "<html><head><title>Crossfire Maps Directory \"$dir\"</title></head><body><h1>Crossfire Maps Directory \"$dir\"</h1><ul>" >&7
23 echo "<li><a href='..'>&lt;parent&gt;</a></li>" >&7 40 echo "<li><a href='..'>&lt;parent&gt;</a></li></ul><h2>This Directory</h2><ul>" >&7
24 for file in *; do 41 for file in *; do
25 if [ -f "$file" ]; then 42 if [ -f "$file" ]; then
26 case "$file" in 43 case "$file" in
27 *.pst | *.jpg | *.png | *.html | *.html.gz | *~ ) 44 *.pst | *.jpg | *.png | *.html | *.html.gz | *~ )
28 ;; 45 ;;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines