File tree 2 files changed +76
-0
lines changed
2 files changed +76
-0
lines changed Original file line number Diff line number Diff line change @@ -30,11 +30,23 @@ Currently, the list of additional packages includes:
30
30
31
31
Feel free to request others, e.g., via Github issues.
32
32
33
+
33
34
## Usage/Installation
34
35
36
+ Quick installation using curl and bash:
37
+ ` $ FOLDER="$HOME/eclipse-apps/emt"; mkdir -p $FOLDER && cd $FOLDER && curl https://raw.githubusercontent.com/eMoflon/emoflon-eclipse-build/main/emoflon-update.sh | bash -s -- $FOLDER `
38
+
39
+ ### Normal installation
40
+
35
41
** The latest release can be found [ here] ( https://github.com/eMoflon/emoflon-eclipse-build/releases/latest ) .**
36
42
Download an archive for the version you are looking for from the release page and extract it.
37
43
44
+ ### Updating
45
+
46
+ You can use the [ update script] ( ./eclipse-update.sh ) to update your installation.
47
+ Example usage:
48
+ ` $ ./eclipse-update.sh ~/eclipse-apps/emt `
49
+
38
50
39
51
## Runner requirements
40
52
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ #
4
+ # Config
5
+ #
6
+
7
+ ECLIPSE_ARCHIVE=eclipse-emoflon-windows-dev # Name of the archive to download
8
+ FORCE_DOWNLOAD=0 # 1 = force download of new archive
9
+ TARGET_DIR=$1 # Target directory
10
+ API_URL=" https://api.github.com/repos/eMoflon/emoflon-eclipse-build/releases/latest"
11
+
12
+ set -e
13
+ START_PWD=$PWD
14
+
15
+ #
16
+ # Utils
17
+ #
18
+
19
+ # Displays the given input including "=> " on the console.
20
+ log () {
21
+ printf " => $1 \n"
22
+ }
23
+
24
+ #
25
+ # Script
26
+ #
27
+
28
+ if [[ -z " $TARGET_DIR " ]]; then
29
+ log " Parameter for target directory was empty. Exit.\n Call script with the parameter, e.g.:\n ./eclipse-update.sh /home/mkratz/eclipse-apps/emt"
30
+ exit 1;
31
+ fi
32
+
33
+ log " Started Eclipse install/update script."
34
+ cd $TARGET_DIR
35
+
36
+ # Get eclipse
37
+ if [[ ! -f " ./$ECLIPSE_ARCHIVE .zip" ]] || [[ " $FORCE_DOWNLOAD " = " 1" ]]; then
38
+ TAG=$( curl -s $API_URL \
39
+ | grep " \" name\" \: \" v" \
40
+ | cut -d : -f 2,3 \
41
+ | tr -d \" | tr -d ,)
42
+ log " Downloading latest eMoflon Eclipse archive from Github.\nRelease:$TAG "
43
+ curl -s $API_URL \
44
+ | grep " $ECLIPSE_ARCHIVE .*zip" \
45
+ | cut -d : -f 2,3 \
46
+ | tr -d \" \
47
+ | wget -qi -
48
+ fi
49
+
50
+ if [[ -f " ./eclipse" ]]; then
51
+ log " Rename old Eclipse folder."
52
+ mv ./eclipse ./eclipse-old
53
+ fi
54
+
55
+ log " Extract new Eclipse archive."
56
+ unzip -qq -o $ECLIPSE_ARCHIVE .zip
57
+
58
+ if [[ -f " ./eclipse-old" ]]; then
59
+ log " Remove old Eclipse folder."
60
+ rm -rf ./eclipse-old
61
+ fi
62
+
63
+ cd $START_PWD
64
+ log " Updated successfully."
You can’t perform that action at this time.
0 commit comments