Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
227 dpurdie 1
#! /usr/bin/bash
2
########################################################################
3
#
4
#   JATS Post Installation Setup for SOLARIS/LINUX
5
#
6
#   This command is to be executed in the directory in which it is found
7
#
8
#   Note: This MUST be a UNIX format file, not a DOS formatted file
9
#
10
########################################################################
11
#
12
#   Determine machine type
13
#
14
if [ -z "$GBE_MACHTYPE" ] ; then
15
	echo "ERROR: GBE_MACHTYPE is not defined"
16
	exit 1
17
fi
18
 
19
#
20
#   Sanity test
21
#
22
if [ ! -d ./TOOLS ] ; then
23
    echo "ERROR: TOOLS directory not found"
24
    exit 1
25
fi
26
 
27
if [ ! -d ./BIN.${GBE_MACHTYPE} ] ; then
28
    echo "ERROR: ./BIN.${GBE_MACHTYPE} directory not found"
29
    exit 1
30
fi
31
 
32
if [ ! -f ./BIN.${GBE_MACHTYPE}/links.sh ] ; then
33
    echo "ERROR: links.sh not found"
34
    exit 1
35
fi    
36
 
37
#
38
#   Ensure some essential scripts are not in DOS format
39
#   The TOOLS/*.pl file conversion will ensure that pod2usage() operates
40
#
41
for file in ./TOOLS/armerge ./BIN.*/links.sh $( find ./TOOLS -name *.pl ); do
42
    chmod +w $file
43
    dos2unix -ascii $file $file 2>/dev/null
44
    chmod -w $file
45
done
46
 
47
#
48
#   Make executables executable
49
#
50
chmod -fR +x ./TOOLS
51
chmod -fR +x ./BIN.*
52
 
53
#
54
#   Release links for all targets.
55
#
56
for dir in ./BIN.*; do
57
    if [ -d $dir ] ; then
58
        cd $dir
59
	echo Processing links in $dir
60
        [ -f ./links.sh ] && sh ./links.sh
61
        cd -
62
    fi
63
done
64
 
65
echo "JATS setup complete"