File: postinst

package info (click to toggle)
joe 4.6-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 10,232 kB
  • sloc: ansic: 51,619; sh: 4,326; makefile: 195; csh: 26
file content (28 lines) | stat: -rw-r--r-- 1,400 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 -e

if [ "$1" = "configure" ]; then

  update-alternatives --install /usr/bin/editor editor /usr/bin/joe 70 \
    --slave /var/lib/misc/editorrc editorrc /etc/joe/joerc \
    --slave /usr/share/man/man1/editor.1.gz editor.1.gz /usr/share/man/man1/joe.1.gz
  update-alternatives --install /usr/bin/editor editor /usr/bin/jmacs 50 \
    --slave /var/lib/misc/editorrc editorrc /etc/joe/jmacsrc \
    --slave /usr/share/man/man1/editor.1.gz editor.1.gz /usr/share/man/man1/jmacs.1.gz
  update-alternatives --install /usr/bin/editor editor /usr/bin/jstar 50 \
    --slave /var/lib/misc/editorrc editorrc /etc/joe/jstarrc \
    --slave /usr/share/man/man1/editor.1.gz editor.1.gz /usr/share/man/man1/jstar.1.gz
  update-alternatives --install /usr/bin/editor editor /usr/bin/jpico 50 \
    --slave /var/lib/misc/editorrc editorrc /etc/joe/jpicorc \
    --slave /usr/share/man/man1/editor.1.gz editor.1.gz /usr/share/man/man1/jpico.1.gz
  update-alternatives --install /usr/bin/editor editor /usr/bin/rjoe 25 \
    --slave /var/lib/misc/editorrc editorrc /etc/joe/rjoerc \
    --slave /usr/share/man/man1/editor.1.gz editor.1.gz /usr/share/man/man1/rjoe.1.gz

  if test -z "$2" || dpkg --compare-versions "$2" lt '3.7-2.3~'; then
    rm -f /etc/joe/editorrc
    ln -sf ../../var/lib/misc/editorrc /etc/joe/editorrc
  fi

  if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi

fi