File: postinst

package info (click to toggle)
emacsen-common 1.4.17
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 296 kB
  • ctags: 30
  • sloc: perl: 194; lisp: 110; makefile: 83; sh: 82
file content (45 lines) | stat: -rw-r--r-- 982 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
45
#!/bin/sh

set -e

if [ ! -e /usr/local/share ]
then
  if mkdir /usr/local/share 2>/dev/null
  then
    chown root:staff /usr/local/share
    chmod 2775 /usr/local/share
  fi
fi

if [ ! -e /usr/local/share/emacs ]
then
  if mkdir /usr/local/share/emacs 2>/dev/null
  then
    chown root:staff /usr/local/share/emacs
    chmod 2775 /usr/local/share/emacs
  fi
fi

if [ ! -e /usr/local/share/emacs/site-lisp ]
then
  if mkdir /usr/local/share/emacs/site-lisp 2>/dev/null
  then
    chown root:staff /usr/local/share/emacs/site-lisp
    chmod 2775 /usr/local/share/emacs/site-lisp
  fi
fi

if [ ! -e /var/lib/emacsen-common/installed-flavors ]
then
  # Be super-careful.
  echo -n "" > /var/lib/emacsen-common/installed-flavors
  chmod 644 /var/lib/emacsen-common/installed-flavors
  echo -n "" > /var/lib/emacsen-common/installed-flavors
fi

/usr/lib/emacsen-common/emacs-package-install emacsen-common

# Clean up dead emacs info entry...
install-info --remove --quiet emacs

exit 0