File: xterm.preinst

package info (click to toggle)
xterm 222-1etch4
  • links: PTS
  • area: main
  • in suites: etch
  • size: 3,552 kB
  • ctags: 4,131
  • sloc: ansic: 45,739; sh: 3,719; perl: 740; makefile: 333
file content (44 lines) | stat: -rw-r--r-- 1,405 bytes parent folder | download | duplicates (2)
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
#!/bin/sh
# Debian xterm package pre-installation script
# Copyright 2003, 2004 Branden Robinson.
# Licensed under the GNU General Public License, version 2.  See the file
# /usr/share/common-licenses/GPL or <http://www.gnu.org/copyleft/gpl.txt>.
# Acknowledgements to Stephen Early, Mark Eichin, and Manoj Srivastava.

# $Id: xterm.preinst.in 189 2005-06-11 00:04:27Z branden $

set -e

THIS_PACKAGE=xterm
THIS_SCRIPT=preinst

#INCLUDE_SHELL_LIB#

if [ "$1" = "upgrade" ] || [ "$1" = "install" ]; then
  if dpkg --compare-versions "$2" lt "4.0.1-1"; then
    # clean up after older alternative that used different path
    if update-alternatives --display x-terminal-emulator |
       fgrep -q /usr/bin/X11/xterm; then
      update-alternatives --remove x-terminal-emulator /usr/bin/X11/xterm
    fi
  fi

  if dpkg --compare-versions "$2" lt "204"; then
    # clean up after older alternative that used different path
    if update-alternatives --display x-terminal-emulator |
       fgrep -q /usr/X11R6/bin/xterm; then

      update-alternatives --remove x-terminal-emulator /usr/X11R6/bin/koi8rxterm
      update-alternatives --remove x-terminal-emulator /usr/X11R6/bin/uxterm
      update-alternatives --remove x-terminal-emulator /usr/X11R6/bin/xterm
      update-alternatives --remove x-terminal-emulator /usr/X11R6/bin/lxterm

    fi
  fi
fi

#DEBHELPER#

exit 0

# vim:set ai et sts=2 sw=2 tw=0: