File: pleiades.postinst.temporary_disabled

package info (click to toggle)
pleiades 1.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 144,860 kB
  • ctags: 938
  • sloc: java: 7,163; xml: 1,361; sh: 52; makefile: 26
file content (42 lines) | stat: -rw-r--r-- 981 bytes parent folder | download | duplicates (2)
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
#!/bin/sh 

set -e

ENABLE_PLEIADES="-javaagent:/usr/lib/eclipse/plugins/jp.sourceforge.mergedoc.pleiades/pleiades.jar"
ECLIPSE_INI="/etc/eclipse.ini"
# somehow without export its results change time by time...
export SETTINGS="`grep -e $ENABLE_PLEIADES $ECLIPSE_INI`"

case "$1" in
    install|configure)
	    . /usr/share/debconf/confmodule
	    db_version 2.0
	    db_get pleiades/eclipse
	    db_stop


	    if [ -f $ECLIPSE_INI ]; then
		    if [ $RET = true ] && [ -z "$SETTINGS" ]; then
			    echo $ENABLE_PLEIADES >> $ECLIPSE_INI
		    elif [ $RET = false ] && [ ! -z "$SETTINGS" ]; then
			    sed -e s%\^$ENABLE_PLEIADES%%g -e /^$/d -i $ECLIPSE_INI
		    fi
	    fi
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

unset SETTINGS
exit 0