#!/bin/sh
#
#  The following script installs CGI version of demo program for MapServer
# on Plamo Linux 4.5.x
# 
#--
DEMONAME=workshop-5.0
WORK=/tmp
#WORK=/expo/Build/mapserver/Custom
( cd $WORK;
  wget -N http://maps.dnr.state.mn.us/mapserver_demos/$DEMONAME.zip )

DEMOROOT=/opt/htdocs/mapserver_demos
mkdir -p $DEMOROOT/tmp
chmod go+rwx $DEMOROOT/tmp
( cd $DEMOROOT/;
  unzip $WORK/$DEMONAME.zip )

( cd $DEMOROOT/$DEMONAME;
  mv index.html index.html.org;
  sed -e 's%/usr/local/www/docs_maps%/opt/htdocs%' \
      -e 's%/cgi-bin/mapserv50%/cgi-bin/mapserv%' \
    index.html.org >  index.html )
#--
# access http://localhost/mapserver_demos/workshop-5.0/ to check it
#							note by J.Kuwamura
