--- projects/cms/source/conient/configure 2001/01/24 03:03:13 1.1 +++ projects/cms/source/conient/configure 2001/03/14 22:21:35 1.4 @@ -1,33 +1,50 @@ #!/bin/sh +# +# i-scream Distributed Centralised Monitoring System +# Conient configure script +# +# $Id: configure,v 1.4 2001/03/14 22:21:35 tdb Exp $ +# + +## Config + +# HTTP Server. This is the source of all downloads. HTTPSERVER="http://killigrew.ukc.ac.uk/" -echo "Generating Makefile includes" -echo "SOURCEROOT="`pwd` > Config.inc -echo "include \$(SOURCEROOT)/Config2.inc" >> Config.inc +# This script uses wget, set it's path and parameters here +WGETPARAM="-nv" +WGET="/usr/local/bin/wget ${WGETPARAM}" -echo "Checking for required libraries" +# This should always be the same +SRCROOT=`pwd` + +## Library check + +echo "> Checking for required libraries" cd build/lib -if test -r "jaxp.jar"; then \ - echo " jaxp.jar found"; \ -else \ - echo " jaxp.jar not found, fetching from ${HTTPSERVER}jaxp.jar"; \ - wget -nv ${HTTPSERVER}jaxp.jar; \ -fi +LIBRARIES="crimson.jar jaxp.jar iscream-util.jar" -if test -r "parser.jar"; then \ - echo " parser.jar found"; \ -else \ - echo " parser.jar not found, fetching from ${HTTPSERVER}parser.jar"; \ - wget -nv ${HTTPSERVER}parser.jar; \ -fi +for LIB in ${LIBRARIES}; do + + if test -r "${LIB}"; then \ + echo " + ${LIB} found"; \ + else \ + echo " - ${LIB} not found, fetching from ${HTTPSERVER}${LIB}"; \ + /usr/local/bin/wget -nv ${HTTPSERVER}${LIB}; \ + fi + +done -if test -r "iscream-util.jar"; then \ - echo " iscream-util.jar found"; \ -else \ - echo " iscream-util.jar not found, fetching from ${HTTPSERVER}iscream-util.jar"; \ - wget -nv ${HTTPSERVER}iscream-util.jar; \ -fi +## Write out the include file for the Makefile's -echo "Configure Completed" +echo "> Generating Makefile includes" +echo " + writing root of source tree" +echo "SOURCEROOT=${SRCROOT}" > ${SRCROOT}/Config.inc +echo " + writing include" +echo "include \$(SOURCEROOT)/Config2.inc" >> ${SRCROOT}/Config.inc + +echo "> Configure Completed" + +## End