1#! /bin/sh
2# BEGIN LICENSE BLOCK
3# Version: CMPL 1.1
4#
5# The contents of this file are subject to the Cisco-style Mozilla Public
6# License Version 1.1 (the "License"); you may not use this file except
7# in compliance with the License.  You may obtain a copy of the License
8# at www.eclipse-clp.org/license.
9# 
10# Software distributed under the License is distributed on an "AS IS"
11# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See
12# the License for the specific language governing rights and limitations
13# under the License. 
14# 
15# The Original Code is  The ECLiPSe Constraint Logic Programming System. 
16# The Initial Developer of the Original Code is  Cisco Systems, Inc. 
17# Portions created by the Initial Developer are
18# Copyright (C) 2006 Cisco Systems, Inc.  All Rights Reserved.
19# 
20# Contributor(s): 
21# 
22# END LICENSE BLOCK
23
24
25if test -z "$ECLIPSEARCH"; then
26        echo Please set environment variable ECLIPSEARCH and try again
27        exit -1
28fi
29
30make_directory ()       # <perm> <name>
31{
32    # explicit checking for symlink is for linux, where test is broken
33    if test ! -d $2 && (test "$ECLIPSEARCH" != "i386_linux" || test ! -h $2); then
34        mkdir $2
35        chmod $1 $2
36    fi
37}
38
39install_file ()		# <perm> <file> <dir>
40{
41    cp $2 $3/$2
42    chmod $1 $3/$2
43}
44
45
46make_directory 2755 ../doc
47install_file 644 index.html ../doc
48
49result=0
50( cd bips; ./INSTALL ) || result=$?
51( cd userman; ./INSTALL ) || result=$?
52( cd embedding; ./INSTALL ) || result=$?
53( cd libman; ./INSTALL ) || result=$?
54( cd tutorial; ./INSTALL ) || result=$?
55( cd visualisation; ./INSTALL ) || result=$?
56( cd applications; ./INSTALL ) || result=$?
57( cd man; ./INSTALL ) || result=$?
58
59# Return an appropriate result code
60exit $result
61
62