File: guile-doc.postinst.gen

package info (click to toggle)
guile-2.0 2.0.13+1-5.1
  • links: PTS
  • area: main
  • in suites: buster, sid
  • size: 27,104 kB
  • sloc: ansic: 133,697; lisp: 67,499; sh: 4,762; makefile: 2,031; perl: 243; awk: 37
file content (52 lines) | stat: -rwxr-xr-x 992 bytes parent folder | download | duplicates (5)
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
#!/bin/bash

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

set -ueo pipefail



if test $# -lt 1; then
    echo "Usage: $(basename "$0"): primary [secondary ...]" 1>&2
    exit 1
fi

primary="$(basename $1)"
shift

cat <<EOF
#!/bin/sh

set -e

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

first=true
for f in "$@"; do
  if [[ $f =~ guile.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