summaryrefslogtreecommitdiff
path: root/debian/emacsVER-common.postinst
blob: 39dbe15584e7a7ee8d436723127964d10190376e (plain)
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
#!/bin/sh

set -e

MAJOR=@MAJOR_VERSION@
MINOR=@MINOR_VERSION@
FULL=@FULL_VERSION@

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

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

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

#DEBHELPER#