-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetEnvironment.sh
executable file
·55 lines (48 loc) · 1.42 KB
/
setEnvironment.sh
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
CHECK_HOME_MSG="Check setHomes.sh or set correct environment variables"
if [ "$ASPECTJ_HOME" == "" ] ; then
echo "Please set the ASPECTJ_HOME variable. $CHECK_HOME_MSG"
exit 1
fi
if [ ! -f "$ASPECTJ_HOME/bin/ajc" ] ; then
echo "Invalid ASPECTJ_HOME. "
echo " It must point to the parent of the bin and lib directory. $CHECK_HOME_MSG"
exit 1
fi
CLASSPATH=$ASPECTJ_HOME/lib/aspectjrt.jar:$CLASSPATH
PATH=$ASPECTJ_HOME/bin:$PATH
if [ "$NEED_TOMCAT" != "" ] ; then
if [ "$TOMCAT_HOME" == "" ] ; then
echo "Please set the TOMCAT_HOME variable. $CHECK_HOME_MSG"
exit 1
fi
if [ ! -d "$TOMCAT_HOME/bin" ] ; then
echo "Invalid TOMCAT_HOME. "
echo "It must point to the parent of the bin directory. $CHECK_HOME_MSG"
exit 1
fi
CATALINA_HOME=$TOMCAT_HOME
fi
if [ "$NEED_ANT" != "" ] ; then
if [ "$ANT_HOME" == "" ] ; then
echo "Please set the ANT_HOME variable. $CHECK_HOME_MSG"
exit 1
fi
if [ ! -f "$ANT_HOME/bin/ant" ] ; then
echo "Invalid ANT_HOME. "
echo "It must point to the parent of bin directory. $CHECK_HOME_MSG"
exit 1
fi
fi
PATH=$ANT_HOME/bin:$PATH
if [ "$MAVEN_HOME" == "" ] ; then
echo "Please set the MAVEN_HOME variable. $CHECK_HOME_MSG"
exit 1
fi
if [ ! -f "$MAVEN_HOME/bin/mvn" ] ; then
echo "Invalid MAVEN_HOME. "
echo "It must point to the parent of bin directory. $CHECK_HOME_MSG"
exit 1
fi
PATH=$MAVEN_HOME/bin:$PATH
export CLASSPATH
export PATH