File: postinst

package info (click to toggle)
fvwm95 2.0.43ba-22
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 5,904 kB
  • ctags: 4,760
  • sloc: ansic: 46,436; makefile: 1,589; sh: 780; perl: 328
file content (75 lines) | stat: -rw-r--r-- 2,506 bytes parent folder | download
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
#!/bin/bash
# fvwm95.postinst based on
#   postinst.skeleton
#   Skeleton maintainer script showing all the possible cases.
#   Written by Charles Briscoe-Smith, March-April 1998.  Public Domain.
# Written by Daniel Martin  Thu,  9 Apr 1998 00:20:58 -0400
# and placed in the public domain

# Abort if any command returns an error value
set -e

# This script is called as the last step of the installation of the
# package.  All the package's files are in place, dpkg has already done
# its automatic conffile handling, and all the packages we depend of
# are already fully installed and configured.

package=fvwm95
binfile=/usr/bin/X11/fvwm95

# Prioirty 49 instead of 50 because fvwm95 is a bit old and is 
# unmaintained upstream
case "$1" in
  configure)
    update-alternatives --install /usr/bin/x-window-manager \
        x-window-manager $binfile 49 \
        --slave /usr/share/man/man1/x-window-manager.1.gz \
        x-window-manager.1.gz /usr/X11R6/man/man1/fvwm95.1x.gz
    rm -rf /etc/X11/fvwm95/deleteme
    chmod a+rx /etc/menu-methods/fvwm95
    if [ -x /usr/bin/update-menus ] ; then 
      /usr/bin/update-menus 
    else # menu default
      zcat /usr/share/doc/fvwm95/examples/example.fvwm95rc_menu.gz > /etc/X11/fvwm95/menudefs.hook
    fi
    set +e
    for i in /usr/local/share/icons /usr/local/share/fvwm95 \
             /usr/local/share/fvwm95/icons; do
      if [ ! -d $i ] ; then
        mkdir -p -m 2775 $i
        chown root.staff $i
      fi
    done
    set -e
    ;;
  abort-upgrade)
    # Back out of an attempt to upgrade this package FROM THIS VERSION
    # to version $2.  Undo the effects of "prerm upgrade $2".
    :
    ;;
  abort-remove)
    if test "$2" != in-favour; then
      echo "$0: undocumented call to \`postinst $*'" 1>&2
      exit 1
    fi
    # Back out of an attempt to remove this package, which was due to
    # a conflict with package $3 (version $4).  Undo the effects of
    # "prerm remove in-favour $3 $4".
    :
    ;;
  abort-deconfigure)
    if test "$2" != in-favour -o "$5" != removing; then
      echo "$0: undocumented call to \`postinst $*'" 1>&2
      exit 1
    fi
    # Back out of an attempt to deconfigure this package, which was
    # due to package $6 (version $7) which we depend on being removed
    # to make way for package $3 (version $4).  Undo the effects of
    # "prerm deconfigure in-favour $3 $4 removing $6 $7".
    :
    ;;
  *) echo "$0: didn't understand being called with \`$1'" 1>&2
     exit 1;;
esac

exit 0