forked from OpenRTM/OpenRTP-aist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_plugins
executable file
·80 lines (70 loc) · 2.06 KB
/
install_plugins
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
#!/bin/sh
#
# @file install_plugins
# @brief Plugin installation script
# @author Noriaki Ando <[email protected]>
#
#------------------------------
#
# This script installs eclipse plugins into existing eclipse dir.
#
# install_plugins <eclipse dir>
#
# ** Environment variables
#
# - REPOSITORY: Plugin repository URL of eclipse update site.
#
# - PLUGINS: Plugins to be installed.
#------------------------------
# Eclipse plugins information
true ${REPOSITORY:="file:///home/openrtm/public_html/pub/eclipse/projects/oxygen,http://download.eclipse.org/releases/oxygen"}
true ${PLUGINS:="org.eclipse.emf.sdk.feature.group
org.eclipse.emf.ecore.xcore.sdk.feature.group
org.eclipse.gef.sdk.feature.group
org.eclipse.xsd.sdk.feature.group"}
#------------------------------
# functions
#------------------------------
#------------------------------------------------------------
# find_equinox()
#------------------------------------------------------------
find_equinox()
{
equinox=`ls $ECLIPSE_HOME/plugins/org.eclipse.equinox.launcher_*.jar`
for e in $equinox ; do
EQUINOX_LAUNCHER=$e
return 0
done
echo "Equinox Launcher jar file not found. Aborting."
exit 1
}
#------------------------------------------------------------
# install_plugins
#------------------------------------------------------------
install_plugins()
{
cmd="java -jar $EQUINOX_LAUNCHER"
app_opt="-application org.eclipse.equinox.p2.director"
dest_opt="-destination $ECLIPSE_HOME"
repo_opt="-repository $REPOSITORY"
for p in $PLUGINS ; do
echo "$cmd $app_opt $dest_opt $repo_opt -installIU $p"
$cmd $app_opt $dest_opt $repo_opt -installIU $p
if test $? -ne 0 ; then
echo "Plugin: $p installation failed. Aborting."
return 0
fi
done
}
#------------------------------
# main
#------------------------------
export LC_ALL=C
if test $# -ne 1 ; then
echo "Target eclipse dir is reuiqred."
echo "$0 <target eclipse dir>"
exit 1
fi
ECLIPSE_HOME=$1
find_equinox
install_plugins