This file is indexed.

postinst is in groovy2 2.4.5-1.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 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
#!/bin/sh
set -e

GROOVY_HOME=/usr/share/groovy2
MANDIR=/usr/share/man
PRIORITY=10

# I decided to assign a priority of 10 to groovy2 alternatives
# and 20 to groovy ones since for jessie there is going to be
# more software in the archive depending on groovy than on groovy2.

add_groovy_alternative() {
    if [ x"" != "x$3" ]; then
        update-alternatives --install /usr/bin/$1 $1 $GROOVY_HOME/bin/$1 $2 \
            --slave $MANDIR/man1/$3.1.gz $1.1.gz $GROOVY_HOME/man/man1/$3.1.gz
    else
        update-alternatives --install /usr/bin/$1 $1 $GROOVY_HOME/bin/$1 $2
    fi
}

for cmd in groovy groovyc grape; do
    add_groovy_alternative $cmd $PRIORITY $cmd
done

# these commands don't have a proper manpage
for cmd in startGroovy groovysh java2groovy groovyConsole groovydoc; do
    add_groovy_alternative $cmd $PRIORITY
done



exit 0