This file is indexed.

postinst is in wing 0.7-30.

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

set -e

DOCDIR="/usr/share/doc/wing"

case "$1" in
  configure)
    if ! dpkg-statoverride --list /usr/games/wing >/dev/null; then
      dpkg-statoverride --update --add root games 2755 /usr/games/wing
    fi
    # Fix old things
    if ! test -f /var/games/wing.scores; then
      if test -f /var/games/wing/scores.dat; then
        mv /var/games/wing/scores.dat /var/games/wing.scores
        rm -f /var/games/wing/scores.default
        rmdir /var/games/wing >/dev/null 2>&1 || true
      else
        cat >/var/games/wing.scores <<EOF
anonymous 0
anonymous 0
anonymous 0
anonymous 0
anonymous 0
anonymous 0
anonymous 0
anonymous 0
anonymous 0
anonymous 0
EOF
      fi
    fi
    # Get rid of all the cruft from earlier wing-data packages
    if test -d /var/games/wing; then
      rm -Rf /var/games/wing
    fi
    # Fix perms, just in case
    chown root:games /var/games/wing.scores
    chmod 0664 /var/games/wing.scores
    # Fix the wing/wing-data circular dependency
    if [ -d "$DOCDIR" -a ! -L "$DOCDIR" ]; then
      rmdir --ignore-fail-on-non-empty "$DOCDIR"
      if [ ! -d "$DOCDIR" ]; then
        ln -s wing-data "$DOCDIR"
      fi
    fi
    ;;
  abort-upgrade|abort-remove|abort-deconfigure)
    ;;
  *)
    echo "postinst called with unknown argument \`$1'" >&2
    exit 1
    ;;
esac

# Automatically added by dh_installmenu
if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
	update-menus
fi
# End automatically added section