File: emacs-common-non-dfsg.postinst.gen

package info (click to toggle)
emacs-non-dfsg 1%3A27.1%2B1-2
  • links: PTS
  • area: non-free
  • in suites: bullseye
  • size: 23,308 kB
  • sloc: makefile: 726; sh: 55
file content (47 lines) | stat: -rwxr-xr-x 905 bytes parent folder | download | duplicates (6)
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/bash

# Expects the full list of uncompressed info files, including emacs.info

set -ueo pipefail

if test $# -eq 0; then
    echo "No info file names provided" 1>&2
    exit 1
fi

cat <<EOF
#!/bin/sh

set -e

if [ "\$1" = configure ] ; then
    update-alternatives \\
        --install /usr/share/info/emacs.info.gz \\
        emacs.info.gz \\
EOF
printf -- '        /usr/share/info/%q/emacs.info.gz \\\n' "$DEB_INFO_SUBDIR"
printf -- '        %q \\\n' "$DEB_ALT_PRIORITY"

first=true
for f in "$@"; do
  if [[ $f =~ /emacs.info$ ]]; then
      continue
  fi
  if test $first; then
      first=''
      echo -ne '        '
  else
    echo -ne ' \\\n        '
  fi
  name="$(basename "$f" .gz)"
  printf -- '--slave /usr/share/info/%q.gz %q.gz \\\n' "$name" "$name"
  echo -n "        "
  printf -- '        /usr/share/info/%q/%q.gz' "$DEB_INFO_SUBDIR" "$name"
done

cat <<EOF

fi

#DEBHELPER#
EOF