File: emacsVER-common.postinst

package info (click to toggle)
emacs21 21.4a%2B1-5.6
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 59,052 kB
  • ctags: 58,903
  • sloc: lisp: 493,229; ansic: 237,171; xml: 4,262; sh: 4,108; makefile: 2,418; perl: 1,069; cs: 776; asm: 254; csh: 9; sed: 4
file content (105 lines) | stat: -rw-r--r-- 2,491 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#!/bin/sh -e

MAJOR=@MAJOR_VERSION@
MINOR=@MINOR_VERSION@
FULL=@FULL_VERSION@
INFO_FILES="@INFO_FILES@"
INFO_SUBDIR="@INFO_SUBDIR@"

# Fix from Manoj so we don't clean up more than we should.
if [ -f /usr/share/info/gnus.gz ]; then
    CRUFT_INFO_FILES="ccmode cl dired-x ediff emacs forms info mh-e reftex sc \
                     vip viper widget"
else
    CRUFT_INFO_FILES="ccmode cl dired-x ediff emacs forms gnus info message \
                     mh-e reftex sc vip viper widget"
fi

# We have to clean these up because the old package didn't.  The info
# files were being removed in the postinst, not the prerm, and so
# install-info wasn't doing anything because the files weren't there..
for file in ${CRUFT_INFO_FILES}
do
  install-info --quiet --remove-exactly ${file} || true
done

for file in ${INFO_FILES}
do
  install-info --quiet --section Emacs "Emacs ${MAJOR}" \
    /usr/share/info/${INFO_SUBDIR}/${file}.gz || true
done

# Create the site-lisp dir for this flavor if we're allowed

#### Begin Bug fix hack for old emacs20 package brain damage.
#
# We have to handle /usr/local/share and /usr/local/share/emacs here
# because emacs20 used to contain /usr/local/share :< .  Normally
# these dirs should have been handled exclusively by emacsen-common.

parentdir=/usr/local
newdir=share

if [ -d ${parentdir} ]
then
  if mkdir ${parentdir}/${newdir} 2>/dev/null
  then
    chown root:staff ${parentdir}/${newdir}
    chmod 2775 ${parentdir}/${newdir}
  fi
fi

parentdir=/usr/local/share
newdir=emacs

if [ -d ${parentdir} ]
then
  if mkdir ${parentdir}/${newdir} 2>/dev/null
  then
    chown root:staff ${parentdir}/${newdir}
    chmod 2775 ${parentdir}/${newdir}
  fi
fi

parentdir=/usr/local/share/emacs
newdir=site-lisp

if [ -d ${parentdir} ]
then
  if mkdir ${parentdir}/${newdir} 2>/dev/null
  then
    chown root:staff ${parentdir}/${newdir}
    chmod 2775 ${parentdir}/${newdir}
  fi
fi

#### End Bug fix hack for old emacs20 package brain damage.


parentdir=/usr/local/share/emacs
newdir=${FULL}

if [ -d ${parentdir} ]
then
  if mkdir ${parentdir}/${newdir} 2>/dev/null
  then
    chown root:staff ${parentdir}/${newdir}
    chmod 2775 ${parentdir}/${newdir}
  fi
fi

parentdir=/usr/local/share/emacs/${FULL}
newdir=site-lisp

if [ -d ${parentdir} ]
then
  if mkdir ${parentdir}/${newdir} 2>/dev/null
  then
    chown root:staff ${parentdir}/${newdir}
    chmod 2775 ${parentdir}/${newdir}
  fi
fi

# emacsen-common/emacs-install used to be here.

#DEBHELPER#