This file is indexed.

postinst is in vim-tiny 2:7.4.052-1ubuntu3.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/sh
set -e

pkg=vim-tiny
variant=tiny
mandir=/usr/share/man

# two things to do:
# 1) add /usr/bin/vim.variant as alternative for /usr/bin/vim. Priority are
#    chosen accordingly to the principle: ``more features, higher priority''
# 2) add /usr/bin/gvim as an alternative for gnome-text-editor for variants
#    built with gnome support. Same principle for the priority above, with the
#    additional constraint that priority should not be higher than gedit's

add_gnome_alternative () {
  if [ -f /usr/bin/gvim ]; then
    update-alternatives --install /usr/bin/gnome-text-editor \
      gnome-text-editor /usr/bin/vim.$variant $1 \
      --slave $mandir/man1/gnome-text-editor.1.gz gnome-text-editor.1.gz \
              $mandir/man1/vim.1.gz
  fi
}

add_variant_alternative () {
  if [ "$variant" != "tiny" ]; then
    update-alternatives --install /usr/bin/vim vim /usr/bin/vim.$variant $1
    update-alternatives --install /usr/bin/vimdiff vimdiff /usr/bin/vim.$variant $1
    update-alternatives --install /usr/bin/rvim rvim /usr/bin/vim.$variant $1
  fi
  update-alternatives --install /usr/bin/rview rview /usr/bin/vim.$variant $1
  # Since other packages provide these commands, we'll setup alternatives for
  # their manpages, too.
  for i in vi view ex editor ; do
    update-alternatives \
      --install /usr/bin/$i $i /usr/bin/vim.$variant $1 \
      --slave $mandir/fr/man1/$i.1.gz $i.fr.1.gz $mandir/fr/man1/vim.1.gz \
      --slave $mandir/it/man1/$i.1.gz $i.it.1.gz $mandir/it/man1/vim.1.gz \
      --slave $mandir/pl/man1/$i.1.gz $i.pl.1.gz $mandir/pl/man1/vim.1.gz \
      --slave $mandir/ru/man1/$i.1.gz $i.ru.1.gz $mandir/ru/man1/vim.1.gz \
      --slave $mandir/ja/man1/$i.1.gz $i.ja.1.gz $mandir/ja/man1/vim.1.gz \
      --slave $mandir/man1/$i.1.gz $i.1.gz \
              $mandir/man1/vim.1.gz
  done
  case "$variant" in
    gtk|gnome|athena) # gui enabled variants
      add_gui_variant_alternative $1
      ;;
  esac
}

add_gui_variant_alternative () {
  for i in gvim gview rgview rgvim evim eview gvimdiff ; do
    update-alternatives --install /usr/bin/$i $i /usr/bin/vim.$variant $1
  done
}

case "$pkg" in
  vim-tiny)
    add_variant_alternative 10
    ;;
  vim)
    add_variant_alternative 30
    ;;
  vim-nox)
    add_variant_alternative 40
    ;;
  vim-gtk|vim-athena)
    add_variant_alternative 50
    ;;
  vim-gnome) # gnome enabled variant
    add_variant_alternative 60
    add_gnome_alternative 45
    ;;
esac



exit 0