-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheclimd
More file actions
executable file
·41 lines (35 loc) · 944 Bytes
/
eclimd
File metadata and controls
executable file
·41 lines (35 loc) · 944 Bytes
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
#!/bin/sh
CONTAINER_NAME=eclim
ECLIM_VERSION=2.7.1
if ! [ -f ~/.eclimrc ]; then
echo "Please copy across the .eclimrc file into $HOME" >&2
exit 1
fi
get_eclimrc_value() {
key=$1
cat ~/.eclimrc \
| sed \
--regexp-extended \
--silent \
"s:^${key}=(.*)$:\1:p" \
| sed \
"s:@user.home:${HOME}:"
}
workspace="$(get_eclimrc_value osgi.instance.area.default)"
port="$(get_eclimrc_value nailgun.server.port)"
mkdir -p ~/.eclim
mkdir -p ~/.eclipse
mkdir -p "${workspace}"
docker run \
--name="${CONTAINER_NAME}" \
--rm \
--publish="${port}:${port}" \
--user="$(id --user):$(id --group)" \
--volume=/etc/passwd:/etc/passwd:ro \
--volume=/etc/group:/etc/group:ro \
--volume="${HOME}/.eclipse:${HOME}/.eclipse" \
--volume="${workspace}:${workspace}" \
--volume="${HOME}/.eclim:${HOME}/.eclim" \
--volume="${HOME}/.eclimrc:${HOME}/.eclimrc" \
alexandrecarlton/eclim:${ECLIM_VERSION} \
"$@"