-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprov.sh
executable file
·86 lines (67 loc) · 2.71 KB
/
prov.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
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/bin/bash
#
# Config
#
ECLIPSE_ARCHIVE=eclipse-emoflon-linux-dev-hipe
EMOFLON_RELEASE=v1.0.0.202312051648
EMOFLON_SRC_URL="https://github.com/eMoflon/emoflon-ibex-eclipse-build/releases/download/$EMOFLON_RELEASE/$ECLIPSE_ARCHIVE.zip"
set -e
START_PWD=$PWD
#
# Utils
#
# Displays the given input including "=> " on the console.
log () {
echo "=> $1"
}
#
# Script
#
log "Start provisioning."
# Remove pre-installed IBeX Eclipse because we need to build our own version
rm -rf ~/eclipse-apps
# Custom IBeX Eclipse
log "Installing custom eMoflon::IBeX Eclipse."
mkdir -p ~/eclipse-apps
cd ~/eclipse-apps
# Get the base Eclipse
if [[ ! -f "./$ECLIPSE_ARCHIVE.zip" ]]; then
log "Downloading specified eMoflon::IBeX Eclipse archive from Github."
wget -q $EMOFLON_SRC_URL
fi
if [[ ! -f "./$ECLIPSE_ARCHIVE.zip" ]]; then
log "Download of eMoflon::IBeX Eclipse archive failed."
exit 1;
fi
unzip -qq -o $ECLIPSE_ARCHIVE.zip
rm -f $ECLIPSE_ARCHIVE.zip
# Overwrite the pre-existing emoflon.properties since this script will build
# an user variant of the Eclipse product manually
cd /home/vagrant
cp -rf emoflon_user.properties /home/vagrant/eclipse-apps/eclipse/emoflon.properties
rm -f emoflon_user.properties
# Install HiPE from custom updatesite to included Eclipse (VM)
cd /home/vagrant
unzip updatesite-hipe.zip -d /home/vagrant/updatesite-hipe
cd /home/vagrant/eclipse-apps/eclipse
./eclipse -noSplash -consoleLog -application org.eclipse.equinox.p2.director -repository file:///home/vagrant/updatesite-hipe/ -installIU hipe.feature.feature.group
# Install eMoflon::IBeX from custom updatesite to included Eclipse (VM)
cd /home/vagrant
unzip updatesite-emoflon.zip -d /home/vagrant/updatesite-emoflon
cd /home/vagrant/eclipse-apps/eclipse
./eclipse -noSplash -consoleLog -application org.eclipse.equinox.p2.director -repository file:///home/vagrant/updatesite-emoflon/ -installIU org.emoflon.ibex.ide.hipe.feature.feature.group,org.emoflon.ibex.ide.feature.feature.group,org.moflon.core.feature.feature.group
# Updatesite clean up
cd /home/vagrant
rm -rf /home/vagrant/updatesite-emoflon /home/vagrant/updatesite-emoflon.zip
rm -rf /home/vagrant/updatesite-hipe /home/vagrant/updatesite-hipe.zip
rm -rf /home/vagrant/updatesite-hipe
rm -rf /home/vagrant/updatesite-emoflon
# Get example projects from ZIP
cd /home/vagrant
mkdir -p /home/vagrant/emoflon-projects
unzip workspace.zip -d /home/vagrant/emoflon-projects
rm -f workspace.zip
# Import example projects into default workspace
cd /home/vagrant/eclipse-apps/eclipse
./eclipse -noSplash -consoleLog -data /home/vagrant/eclipse-workspace -application com.seeq.eclipse.importprojects.headlessimport -importProject /home/vagrant/emoflon-projects/
log "Finished provisioning."