File: postinst-base

package info (click to toggle)
xemacs21 21.4.24-12
  • links: PTS
  • area: main
  • in suites: sid
  • size: 34,212 kB
  • sloc: ansic: 243,882; lisp: 94,071; cpp: 5,726; sh: 4,406; perl: 1,096; cs: 775; makefile: 765; python: 279; asm: 248; lex: 119; yacc: 95; sed: 22; csh: 9
file content (41 lines) | stat: -rw-r--r-- 1,369 bytes parent folder | download | duplicates (8)
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
#!/bin/sh -e
set -e

# oops.  Needed to check version on upgrade.  Now just need to remove old ones.
for i in 1 2 3 4 5 6 ; do
    update-alternatives --remove xemacs21 /usr/bin/xemacs-21.4.$i-REPLACE_ME
done

update-alternatives --install /usr/bin/xemacs@MAJVERSION@ xemacs@MAJVERSION@ /usr/bin/xemacs@MAJVERSION@-REPLACE_ME 70

# Ok we dont' want to compile these files when we already have another
# installed.
ALREADY_MULE=0
ALREADY_NOMULE=0
for i in mule mule-canna-wnn gnome-mule 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_MULE=1
  fi
done

for i in nomule gnome-nomule ; 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_NOMULE=1
  fi
done

#if [ "$ALREADY_MULE" = "0" ] ; then
   #/usr/lib/emacsen-common/emacs-install xemacs@MAJVERSION@-mule
#fi

#if [ "$ALREADY_NOMULE" = "0" ] ; then
   #/usr/lib/emacsen-common/emacs-install xemacs@MAJVERSION@-nomule
#fi

if [ "$ALREADY_NOMULE" = "0" -a "$ALREADY_MULE" = "0" ] ; then
   /usr/lib/emacsen-common/emacs-install xemacs@MAJVERSION@
fi

##DEBHELPER##