-
Notifications
You must be signed in to change notification settings - Fork 6
/
buildRTC.sh
executable file
·54 lines (48 loc) · 1.18 KB
/
buildRTC.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
#!/bin/sh
#
#
#------------------------------------------------------------
# find_anthome
#
# This function estimate ANT_HOME from ant, which usually
# is a symbolic link to $ANT_HOME/bin/ant.
#------------------------------------------------------------
find_anthome()
{
if test ! "x$ANT_HOME" = "x" ; then
if test -d $ANT_HOME && test -f $ANT_HOME/bin/ant ; then
return 0
fi
echo "ant cannot be found under ANT_HOME: $ANT_HOME"
fi
echo "Valid Environment variable ANT_HOME is not set. Searching..."
tmp=`readlink -e $(which ant)`
ant_path=`dirname $tmp | sed 's/\/bin$//'`
if test "x$ant_path" = "x" ; then
echo "Ant not found. Please install Ant and set ANT_HOME."
exit 1
fi
export ANT_HOME=$ant_path
return 0
}
find_anthome
echo "------------------------------------------------------------"
echo "Environment variables:"
echo "ANT_HOME: $ANT_HOME"
echo "------------------------------------------------------------"
if test $# -eq 0 ; then
var_for="buildAllLinux"
else
var_for=$1
fi
#
#
#
cd jp.go.aist.rtm.RTC
ant $var_for -lib $ANT_HOME/lib
if [ $? -ne 0 ];
then
exit 1
fi
echo "--"
cd ..