-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInstall
executable file
·94 lines (81 loc) · 1.52 KB
/
Install
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
#!/bin/sh
#
# Installation script
#
# 1) cp littriageload.config.default littriageload.config
# 2) Install
#
Usage=Install
#
# Function called when the install fails.
#
installFailed ()
{
echo "Installation Failed: `date`"
exit 1
}
#
# Verify the arguments to the script, there shouldn't be any
#
if [ $# -ne 0 ]
then
echo "Usage: ${Usage}"
installFailed
fi
#
# Make sure config files exist
#
cd `dirname $0`
# establish the config files
MAIN_CONFIG=littriageload.config
# Make sure config file exists and source it
if [ -r ${MAIN_CONFIG} ]
then
echo "Source ${MAIN_CONFIG}"
. ${MAIN_CONFIG}
else
echo "Cannot source configuration file: ${MAIN_CONFIG}"
installFailed
fi
# Check to see if this is a development installation
#
DEV=""
if [ "${INSTALL_TYPE}" = "dev" ]
then
DEV="-d"
fi
#
# run DLAInstall for each configuration file
#
echo 'running DLAINSTALL'
${DLAINSTALL} ${DEV}
#
# Create the some directories
#
if [ ! -d ${INPUTDIR} ]
then
mkdir -p ${INPUTDIR}
fi
if [ ! -d ${LITTRIAGE_NEWNEW} ]
then
mkdir -p ${LITTRIAGE_NEWNEW}
fi
#
# Create curator subdirectories in input directory
# Create curator subdirectories in needs review directory
# note: this will not remove old/obsolete input directories
# archive obsolete curator directories manually
#
cd ${PUBLISHEDDIR}
for i in *
do
ls -l $i
mkdir -p ${INPUTDIR}/${i}
mkdir -p ${NEEDSREVIEWTRIAGEDIR}/${i}
done
echo 'input directory'
ls -l ${INPUTDIR}
echo 'needs review directory'
ls -l ${NEEDSREVIEWTRIAGEDIR}
cd ${LITTRIAGELOAD}
exit 0