-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInstall
More file actions
executable file
·155 lines (133 loc) · 4.07 KB
/
Install
File metadata and controls
executable file
·155 lines (133 loc) · 4.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#!/bin/sh
#
# Installation script for the genemodelload product
#
###########################################################################
cd `dirname $0`
COMMON_CONFIG=genemodel_common.config
PROVIDER_CONFIGS="biotypemapping.config genemodel_ensembl.config genemodel_ncbi.config genemodel_ensemblreg.config genemodel_vistareg.config mgireg.gff3.config"
#
# Function called when the install fails.
#
installFailed ()
{
echo "Installation Failed: `date`"
exit 1
}
#
# Make sure all the configuration files exist.
#
for i in ${COMMON_CONFIG} ${PROVIDER_CONFIGS}
do
if [ ! -r ${i} ]
then
echo "Missing configuration file: ${i}"
installFailed
fi
done
#
# Source the common configuration file.
#
. ${COMMON_CONFIG}
#
# Check to see if this is a development installation.
#
DEV=""
if [ "${INSTALL_TYPE}" = "dev" ]
then
DEV="-d"
fi
#
# Run the DLAInstall.
#
${DLAINSTALL} ${DEV}
#
# The DLAInstall script removes all permissions from shell scripts for
# group "other" on non-development servers. The gene model QC report wrapper
# script needs to have permissions restored to allow the curation staff to run it.
#
chmod -f 755 ${GENEMODEL_QC_SH}
#
# Handle installation tasks specific to each provider.
#
for i in ${PROVIDER_CONFIGS}
do
#
# Source the provider configuration file.
#
. ${i}
#
# For any server, if the association file does not exist already, create one that is writable.
#
if [ ! -f ${ASSOC_FILE_DEFAULT} ]
then
echo "Creating ${ASSOC_FILE_DEFAULT}"
touch ${ASSOC_FILE_DEFAULT}
chmod 664 ${ASSOC_FILE_DEFAULT}
chgrp mgi ${ASSOC_FILE_DEFAULT}
fi
done
#
# For any server, the these directories are opened up
# to allow the curation staff to publish new association files.
#
# The config files needs to be open to allow curators to edit them for testing.
#
chmod -fR 777 ${INPUTDIR}
#
# The following steps must all be done on the TEST SERVER:
# opens up all permissions
#
# once the new curator server is ready:
# a) replace bhmgidevapp01 with the curator server name
# b) do not need the MGI_LIVE check because it will use "live"
#
if [ `uname -n` = "bhmgidevapp01" -a "${MGI_LIVE}" = "/usr/local/mgi/test" ]
then
echo "Setting permissions...${DATALOADSOUTPUT}"
chgrp mgi *config
chmod -f 666 *config
chmod -fR 777 ${DATALOADSOUTPUT}/assembly
chmod -fR 777 ${DATALOADSOUTPUT}/ensembl
chmod -fR 777 ${DATALOADSOUTPUT}/mgi/genemodelload
chmod -fR 777 ${DATALOADSOUTPUT}/mgi/vocload/runTimeBiotype
chmod -fR 777 ${DATALOADSOUTPUT}/mgi/seqcacheload
chmod -fR 777 ${DATALOADSOUTPUT}/mgi/mrkcacheload
chmod -fR 777 ${ASSOCLOAD}
chmod -fR 777 ${ASSEMBLYSEQLOAD}
chmod -fR 777 ${SEQSEQASSOCLOAD}
chmod -f 666 ${ASSEMBLYSEQLOAD}/*.config
chmod -fR 777 ${DATALOADSOUTPUT}/mgi/pgdbutilities/logs
fi
# copy the scripts for curator use into a standard location which exists in
# their path statements
# trim any trailing slash from MGIBIN variable
DEPLOY_PATH=`echo "${MGIBIN}" | sed 's./$..'`
if [ "${DEPLOY_PATH}" = "" ]; then
echo "Warning: MGIBIN variable missing from mgiconfig; cannot deploy curator files"
exit 0
fi
if [ ! -d ${DEPLOY_PATH} ]; then
# failure to deploy is not a fatal error; could happen during
# development under a home directory
echo "Warning: ${DEPLOY_PATH} does not exist; curator scripts were not copied."
exit 0
fi
if [ -d ${DEPLOY_PATH} ]; then
# copy files, change permissions, and check for errors
# deployment errors are non-fatal, as they can occur regularly in an
# SE's development area
for file in runGeneModelQC publishAssocFile
do
cp bin/${file} ${DEPLOY_PATH}
if [ $? -ne 0 ]; then
echo "Warning: Failed to copy ${file} to ${DEPLOY_PATH}"
fi
chmod 755 ${DEPLOY_PATH}/${file}
if [ $? -ne 0 ]; then
echo "Warning: Failed to change permissions on ${DEPLOY_PATH}/${file}"
fi
done
echo "Deployed curator files to ${DEPLOY_PATH}"
fi
exit 0