head	1.1;
access;
symbols;
locks; strict;
comment	@# @;


1.1
date	99.03.14.22.34.20;	author stefano;	state Exp;
branches;
next	;


desc
@@


1.1
log
@Since the only thing that remains on the web site is the script
that creates it getting the HTML docs from CVS, I think we should
place a copy here and have it CVSed.

I also tried to convert our old update.sh to a GNU make makefile
to allow easier making and greater flexibility. Too bad I know
nothing about GNU make :-( so, UNIX gurus around here should
try to fill up my blanks and to convert my pseudo code to some
working solution.

The skeleton is in place, so you just get in end implement the
lines that start with "-->". Once the makefile is done, we'll have
a much simpler script that takes this makefile out of the CVS
and says "make".

BTW, I tried to abstract the makefile from our own site to allow
other projects to use our same information system model in the
future.

Hope I didn't do such a bad job with my pseudo-makefile ;-)
@
text
@################################################################################
#
# This makefile creates the web site by accessing the CVS.
#
# Written by Stefano Mazzocchi, Jon S. Stevens
# $Id: update.sh,v 1.3 1998/12/15 18:03:21 stefano Exp $
################################################################################

################################################################################
# Common definitions.  Edit these settings for your site.  
#
# CVS  : the CVS root where the modules are stored
# TOP  : the top level directory (use absolute path)
# TEMP : the temporary directory (use absolute path)
# PASS : the CVS passwork (use a read only CVS account since this file may leak)
################################################################################

CVS      = :pserver:jservpub@@cvs.working-dogs.com:/products/cvs/master
TOP      = /www/apache.org/java
TEMP     = $(TOP)/temp
PASSWORD = jservpub

################################################################################
# Module names
################################################################################

# Site is the module that contains the web site top level
SITE = java_apache_org

# Modules is the list of modules inside your web site.
MODULES = jserv \
          jserv_ssi \
          james \
          framework \
          picoserver \
          cocoon \
          spfc \
          mod_java \

################################################################################
# You should not need to change anything below this line
################################################################################

# General methods

login: 
        echo "Logging into CVS.."
-->        cvs login -d $(CVS) < $(PASSWORD)
        
start:
        echo "Creating web site...
        mkdir $(TEMP)
        cd $(TEMP)

        echo " * Getting site module from CVS"
        cvs -z9 -Q -d $(CVS) checkout $(SITE)

        echo " * Getting project modules from CVS (this may take a while)"
-->        [for each MODULE in MODULES] cvs -z9 -Q -d $(CVS) checkout $(MODULE)/docs

directories: 
        echo " * Creating directories structure"
-->        [for each MODULE in MODULES] mkdir $(TOP)/$(MODULE)

copy:
        echo " * Copying documents to appropriate places"
        cp -R $(TEMP)/$(SITE)/* ${TOP}
-->        [for each MODULE in MODULES] cp -R $(TEMP)/$(MODULE)/docs/* ${TOP}/$(MODULE)

permissions:
        cd $(TOP)
        echo "* Setting permissions"
        find . -type file -exec chmod 664 \{\} \;
        find . -type dir -exec chmod 775 \{\} \;

done:
        echo "* Removing temporary directory"
        rm -R $(TEMP)
        
        echo "* Setting last update"
-->        [if $(TOP)/LAST_UPDATE not found] echo "" > $(TOP)/LAST_UPDATE
        touch $(TOP)/LAST_UPDATE

        echo "Done!"
        
test:   
        @@echo CVS root: $(CVS)
        @@echo Top directory: $(TOP)
        @@echo Temp directory: $(TEMP)
        @@echo CVS password: $(PASSWORD)

# Global methods
        
all: start copy done

new: login start directories copy permissions done
        @
