-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheclipse-ws
More file actions
executable file
·46 lines (35 loc) · 886 Bytes
/
eclipse-ws
File metadata and controls
executable file
·46 lines (35 loc) · 886 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
42
43
44
45
46
#!/bin/bash
#
# eclipse-ws
# ==========
# Simple script for linking eclipse workspace settings to another directory.
#
# usage: eclipse-ws [/path/to/shared/settings] [/path/to/workspace]
# shared settings folder must exists
function print_usage {
echo "usage: eclipse-ws [/path/to/shared/workspace/settings] [/path/to/workspace]"
}
# prints to stderr
function echoerr() {
echo "$@" 1>&2;
}
if [ ! $# -eq 2 ] ; then
print_usage
exit 1
fi
if [ ! -d $1 ] ; then
echoerr "folder with shared settings does not exists"
exit 1
fi
if [ ! -d $2 ] ; then
mkdir -p $2
fi
# convert path to absolute
shared_settings=$( cd $1 ; pwd)
#convert path to absolute
workspace=$(cd $2 ; pwd)
ws_settings="$workspace/.metadata/.plugins/org.eclipse.core.runtime"
if [ ! -d $ws_settings ] ; then
mkdir -p $ws_settings
fi
ln -s $shared_settings $ws_settings/.settings