File: prerm-base

package info (click to toggle)
xemacs21 21.4.24-9
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 33,952 kB
  • sloc: ansic: 243,821; lisp: 94,071; cpp: 5,726; sh: 4,406; perl: 1,096; cs: 775; makefile: 761; python: 279; asm: 248; lex: 119; yacc: 95; sed: 22; csh: 9
file content (26 lines) | stat: -rw-r--r-- 764 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
#!/bin/sh -e
set -e

if [ "$1" != "upgrade" ] ; then
  update-alternatives --remove xemacs@MAJVERSION@ /usr/bin/xemacs@MAJVERSION@-REPLACE_ME
fi

# Ok we dont' want to deinstall these files when we already have another
# installed.
ALREADY=0
for i in mule nomule mule-canna-wnn gnome-mule gnome-nomule gnome-mule-canna-wnn ; do
  STAT=`dpkg -s xemacs@MAJVERSION@-$i 2>/dev/null | perl -ne 'next if $_ !~ m/^Status/; $_ =~ s/^Status:\s*(.*)/$1/; print;'`
  if [ "REPLACE_ME" != "$i" -a "$STAT" = "install ok installed" ] ; then
    ALREADY=1
  fi
done

if [ "$ALREADY" = "0" ] ; then
  /usr/lib/emacsen-common/emacs-remove xemacs@MAJVERSION@
fi

if [ -L /usr/doc/xemacs@MAJVERSION@-REPLACE_ME ]; then
	rm -f /usr/doc/xemacs@MAJVERSION@-REPLACE_ME
fi

##DEBHELPER##