1 |
|
#!/bin/sh |
2 |
|
|
3 |
+ |
# |
4 |
+ |
# i-scream Distributed Centralised Monitoring System |
5 |
+ |
# Conient configure script |
6 |
+ |
# |
7 |
+ |
# $Id$ |
8 |
+ |
# |
9 |
+ |
|
10 |
+ |
## Config |
11 |
+ |
|
12 |
+ |
# HTTP Server. This is the source of all downloads. |
13 |
|
HTTPSERVER="http://killigrew.ukc.ac.uk/" |
14 |
|
|
15 |
< |
echo "Generating Makefile includes" |
16 |
< |
echo "SOURCEROOT="`pwd` > Config.inc |
17 |
< |
echo "include \$(SOURCEROOT)/Config2.inc" >> Config.inc |
15 |
> |
# This script uses wget, set it's path and parameters here |
16 |
> |
WGETPARAM="-nv" |
17 |
> |
WGET="/usr/local/bin/wget ${WGETPARAM}" |
18 |
|
|
19 |
< |
echo "Checking for required libraries" |
19 |
> |
# This should always be the same |
20 |
> |
SRCROOT=`pwd` |
21 |
> |
|
22 |
> |
## Library check |
23 |
> |
|
24 |
> |
echo "> Checking for required libraries" |
25 |
|
cd build/lib |
26 |
|
|
27 |
< |
if test -r "jaxp.jar"; then \ |
13 |
< |
echo " jaxp.jar found"; \ |
14 |
< |
else \ |
15 |
< |
echo " jaxp.jar not found, fetching from ${HTTPSERVER}jaxp.jar"; \ |
16 |
< |
wget -nv ${HTTPSERVER}jaxp.jar; \ |
17 |
< |
fi |
27 |
> |
LIBRARIES="crimson.jar jaxp.jar iscream-util.jar" |
28 |
|
|
29 |
< |
if test -r "parser.jar"; then \ |
30 |
< |
echo " parser.jar found"; \ |
31 |
< |
else \ |
32 |
< |
echo " parser.jar not found, fetching from ${HTTPSERVER}parser.jar"; \ |
33 |
< |
wget -nv ${HTTPSERVER}parser.jar; \ |
34 |
< |
fi |
29 |
> |
for LIB in ${LIBRARIES}; do |
30 |
> |
|
31 |
> |
if test -r "${LIB}"; then \ |
32 |
> |
echo " + ${LIB} found"; \ |
33 |
> |
else \ |
34 |
> |
echo " - ${LIB} not found, fetching from ${HTTPSERVER}${LIB}"; \ |
35 |
> |
${WGET} ${HTTPSERVER}${LIB}; \ |
36 |
> |
fi |
37 |
> |
|
38 |
> |
done |
39 |
|
|
40 |
< |
if test -r "iscream-util.jar"; then \ |
27 |
< |
echo " iscream-util.jar found"; \ |
28 |
< |
else \ |
29 |
< |
echo " iscream-util.jar not found, fetching from ${HTTPSERVER}iscream-util.jar"; \ |
30 |
< |
wget -nv ${HTTPSERVER}iscream-util.jar; \ |
31 |
< |
fi |
40 |
> |
## Write out the include file for the Makefile's |
41 |
|
|
42 |
< |
echo "Configure Completed" |
42 |
> |
echo "> Generating Makefile includes" |
43 |
> |
echo " + writing root of source tree" |
44 |
> |
echo "SOURCEROOT=${SRCROOT}" > ${SRCROOT}/Config.inc |
45 |
> |
echo " + writing include" |
46 |
> |
echo "include \$(SOURCEROOT)/Config2.inc" >> ${SRCROOT}/Config.inc |
47 |
> |
|
48 |
> |
echo "> Configure Completed" |
49 |
> |
|
50 |
> |
## End |