File: postinst

package info (click to toggle)
emacsen-common 3.0.8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 152 kB
  • sloc: perl: 425; sh: 87; lisp: 72; makefile: 26
file content (30 lines) | stat: -rw-r--r-- 904 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
#!/bin/sh

set -e

# Convert installed-flavors to flavor/installed/*.
if test -e /var/lib/emacsen-common/installed-flavors
then
  for flavor in $(cat /var/lib/emacsen-common/installed-flavors)
  do
    touch "/var/lib/emacsen-common/state/flavor/installed/$flavor"
  done
  rm -f /var/lib/emacsen-common/installed-flavors
fi

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

# Reinstall all flavors during upgrade.  See the comments in the
# preinst and https://bugs.debian.org/1106291

for flavor in /var/lib/emacsen-common/state/flavor/pending/*[!~]; do
    case "$flavor" in
        */pending/\**) break ;; # no flavors
    esac
    flavor="$(basename "$flavor")"
    echo "Reinstalling emacsen flavor $flavor after emacsen-common upgrade" 1>&2
    /usr/lib/emacsen-common/emacs-install "$flavor"
    rm "/var/lib/emacsen-common/state/flavor/pending/$flavor"
done

#DEBHELPER#