1 |
#!/bin/sh
|
2 |
#===========================================================================#
|
3 |
# NAME: makeInstall.sh #
|
4 |
#===========================================================================#
|
5 |
# DATE: Mon Nov 18 14:38:21 2002 #
|
6 |
# AUTHOR: Shaun Ashby #
|
7 |
# MOD LOG: #
|
8 |
#===========================================================================#
|
9 |
# DESCRIPTION: Script to build the SCRAM documentation. #
|
10 |
#===========================================================================#
|
11 |
VERSION=$1
|
12 |
SCRAMBASE=$2
|
13 |
|
14 |
# Exit if no version is given:
|
15 |
if [[ $VERSION == "" ]]; then
|
16 |
echo "** You must specify a VERSION! **"
|
17 |
exit 1
|
18 |
fi
|
19 |
# Exit if no scram base dir is given:
|
20 |
if [[ $SCRAMBASE == "" ]]; then
|
21 |
echo "** You must specify a SCRAM release directory!**"
|
22 |
exit 1
|
23 |
fi
|
24 |
|
25 |
# Set some locations:
|
26 |
HTMLDOCDIR=${SCRAMBASE}/$VERSION/doc/html
|
27 |
|
28 |
# And start:
|
29 |
echo
|
30 |
echo "Making installation of SCRAM $VERSION: `date`"
|
31 |
echo "------------------------------------------------------------------------"
|
32 |
echo
|
33 |
|
34 |
# Change into SCRAM base dir:
|
35 |
cd $SCRAMBASE
|
36 |
echo "Current dir: `pwd`"
|
37 |
|
38 |
# Check that the sources for this version have
|
39 |
# been checked out into current directory:
|
40 |
if [[ ! -d $VERSION ]]; then
|
41 |
echo "No SCRAM sources for version $VERSION. Bye."
|
42 |
exit 1
|
43 |
fi
|
44 |
|
45 |
if [[ -f ./scram ]]; then
|
46 |
echo "Backing up existing SCRAM script..."
|
47 |
cp scram scram.old
|
48 |
fi
|
49 |
echo
|
50 |
echo "Running install script:"
|
51 |
pushd $SCRAMBASE/$VERSION/Installation >/dev/null 2>&1
|
52 |
./install_scram
|
53 |
popd >/dev/null 2>&1
|
54 |
|
55 |
# Check that scram is there:
|
56 |
[ -f ./scram ] || exit 1
|
57 |
|
58 |
# Make the links:
|
59 |
echo
|
60 |
echo "Making links \"current\" and \"recommended\"....."
|
61 |
rm -f current recommended
|
62 |
ln -s $VERSION current
|
63 |
ln -s $VERSION recommended
|
64 |
|
65 |
echo
|
66 |
echo "-- done --"
|