-
Notifications
You must be signed in to change notification settings - Fork 0
/
prov.sh
60 lines (45 loc) · 1.33 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
#!/bin/bash
#
# Config
#
ECLIPSE_ARCHIVE=eclipse-gips-linux-user-ci
GIPS_RELEASE=v1.0.0.202301191308
GIPS_SRC_URL="https://github.com/Echtzeitsysteme/gips-eclipse-build/releases/download/$GIPS_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."
# GIPS Eclipse (CI)
log "Installing GIPS Eclipse (CI)."
mkdir -p ~/eclipse-apps-ci
cd ~/eclipse-apps-ci
# Get Eclipse (CI)
if [[ ! -f "./$ECLIPSE_ARCHIVE.zip" ]]; then
log "Downloading latest GIPS Eclipse archive from Github."
wget -q $GIPS_SRC_URL
fi
if [[ ! -f "./$ECLIPSE_ARCHIVE.zip" ]]; then
log "Download of GIPS Eclipse (CI) archive failed."
exit 1;
fi
unzip -qq -o $ECLIPSE_ARCHIVE.zip
rm -f $ECLIPSE_ARCHIVE.zip
# Get example projects
mkdir -p /home/vagrant/git && cd /home/vagrant/git
git clone https://github.com/Echtzeitsysteme/gips-gcm-2023-example.git
# Import example projects into default workspace
cd /home/vagrant/eclipse-apps-ci/eclipse
./eclipse -noSplash -consoleLog -data /home/vagrant/eclipse-workspace -application com.seeq.eclipse.importprojects.headlessimport -importProject /home/vagrant/git/gips-gcm-2023-example/
# Eclipse CI clean up
cd /home/vagrant
rm -rf /home/vagrant/eclipse-apps-ci
log "Finished provisioning."