--- projects/cms/source/conient/configure	2001/01/30 11:48:28	1.2
+++ projects/cms/source/conient/configure	2001/03/14 21:56:00	1.3
@@ -1,33 +1,50 @@
 #!/bin/sh
 
+#
+# i-scream Distributed Centralised Monitoring System
+# Conient configure script
+#
+# $Id: configure,v 1.3 2001/03/14 21:56:00 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
+PWD=`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"; \
-  /usr/local/bin/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"; \
-  /usr/local/bin/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"; \
-  /usr/local/bin/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=${PWD}" > ${PWD}/Config.inc
+echo "  + writing include"
+echo "include \$(SOURCEROOT)/Config2.inc" >> ${PWD}/Config.inc
+
+echo "> Configure Completed"
+
+## End