-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathide-eclipse.sh
74 lines (55 loc) · 3.52 KB
/
ide-eclipse.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash -x
echo "####################### Components: $(basename $0) ###########################"
echo ">>>> Who am i: `whoami` ; UID=`id -u` ; GID=`id -g`"
PRODUCT_VERSION=photon
PRODUCT_EXE=/opt/eclipse/eclipse
WORKSPACE=${HOME}/eclipse-workspace
INSTALL_DIR=${HOME}/tools
## ----------------------------------------------------------------------------
## ---- To change to different Eclipse version: e.g., oxygen, change here! ----
## ----------------------------------------------------------------------------
## -- 1.) Eclipse version: oxygen, photon, etc.: -- ##
ECLIPSE_VERSION=${ECLIPSE_VERSION:-photon}
## -- 2.) Eclipse Type: -- ##
ECLIPSE_TYPE=${ECLIPSE_TYPE:-jee}
#ECLIPSE_TYPE=${ECLIPSE_TYPE:-modeling}
## -- 3.) Eclipse Release: -- ##
ECLIPSE_RELEASE=${ECLIPSE_RELEASE:-R}
#ECLIPSE_RELEASE=${ECLIPSE_RELEASE:-2}
## -- 4.) Eclipse Download Mirror site: -- ##
#ECLIPSE_OS_BUILD=${ECLIPSE_OS_BUILD:-win32-x86_64}
ECLIPSE_OS_BUILD=${ECLIPSE_OS_BUILD:-linux-gtk-x86_64}
## -- 5.) Eclipse Download Mirror site: -- ##
#http://mirror.math.princeton.edu/pub/eclipse/technology/epp/downloads/release/photon/R/eclipse-jee-photon-R-linux-gtk-x86_64.tar.gz
#http://mirror.math.princeton.edu/pub/eclipse/technology/epp/downloads/release/photon/R/eclipse-modeling-photon-R-linux-gtk-x86_64.tar.gz
ECLIPSE_MIRROR_SITE_URL=${ECLIPSE_MIRROR_SITE_URL:-http://mirror.math.princeton.edu}
## ----------------------------------------------------------------------------------- ##
## ----------------------------------------------------------------------------------- ##
## ----------- Don't change below unless Eclipse download system change -------------- ##
## ----------------------------------------------------------------------------------- ##
## ----------------------------------------------------------------------------------- ##
## -- Eclipse TAR/GZ filename: -- ##
#ECLIPSE_TAR=${ECLIPSE_TAR:-eclipse-jee-photon-R-linux-gtk-x86_64.tar.gz}
ECLIPSE_TAR=${ECLIPSE_TAR:-eclipse-${ECLIPSE_TYPE}-${ECLIPSE_VERSION}-${ECLIPSE_RELEASE}-${ECLIPSE_OS_BUILD}.tar.gz}
## -- Eclipse Download route: -- ##
ECLIPSE_DOWNLOAD_ROUTE=${ECLIPSE_DOWNLOAD_ROUTE:-pub/eclipse/technology/epp/downloads/release/${ECLIPSE_VERSION}/${ECLIPSE_RELEASE}}
## -- Eclipse Download full URL: -- ##
## e.g.: http://mirror.math.princeton.edu/pub/eclipse/technology/epp/downloads/release/photon/R/
## e.g.: http://mirror.math.princeton.edu/pub/eclipse/technology/epp/downloads/release/photon/R/
ECLIPSE_DOWNLOAD_URL=${ECLIPSE_DOWNLOAD_URL:-${ECLIPSE_MIRROR_SITE_URL}/${ECLIPSE_DOWNLOAD_ROUTE}}
## http://ftp.osuosl.org/pub/eclipse/technology/epp/downloads/release/photon/R/eclipse-jee-photon-R-linux-gtk-x86_64.tar.gz
## http://mirror.math.princeton.edu/pub/eclipse/technology/epp/downloads/release/photon/R/eclipse-jee-photon-R-linux-gtk-x86_64.tar.gz
## http://mirror.math.princeton.edu/pub/eclipse/technology/epp/downloads/release/photon/R/eclipse-modeling-photon-R-linux-gtk-x86_64.tar.gz
cd ${HOME};
mkdir -p ${INSTALL_DIR} ${WORKSPACE}
wget --quiet -c ${ECLIPSE_DOWNLOAD_URL}/${ECLIPSE_TAR} && tar xvf ${ECLIPSE_TAR} && rm ${ECLIPSE_TAR}
#################################
#### Install Eclipse Plugins ####
#################################
# ... add Eclipse plugin - installation here (see example in https://github.com/DrSnowbird/papyrus-sysml-docker)
sudo apt-get update -y && sudo apt-get install -y libwebkitgtk-3.0-0
##################################
#### Start up Application ####
##################################
cd ${WORKSPACE}
nohup /bin/bash -c "${PRODUCT_EXE} ${WORKSPACE}" 2>&1 >> /dev/null &