File: groovy.postinst

package info (click to toggle)
groovy 2.4.16-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 30,536 kB
  • sloc: java: 157,039; xml: 728; sh: 357; makefile: 64
file content (28 lines) | stat: -rw-r--r-- 666 bytes parent folder | download | duplicates (5)
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
#!/bin/sh
set -e

GROOVY_HOME=/usr/share/groovy
MANDIR=/usr/share/man
PRIORITY=20

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

#DEBHELPER#

exit 0