File: man2html.postinst

package info (click to toggle)
man2html 1.6g-11
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,720 kB
  • sloc: ansic: 9,673; sh: 2,309; perl: 335; makefile: 328; awk: 305; lisp: 171; cs: 170; xml: 119
file content (33 lines) | stat: -rw-r--r-- 765 bytes parent folder | download | duplicates (3)
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
#!/bin/sh
# vim: ts=4:sw=4:et
set -e

#DEBHELPER#

. /usr/share/debconf/confmodule

if [ "$1" != "configure" ] ; then 
    db_stop || true
    exit 0  
fi

INDEX_SCRIPT=/etc/cron.weekly/man2html

if [ -e /var/cache/man2html/ ] \
    && which index++ >/dev/null \
    && [ -x "$INDEX_SCRIPT" ] \
    && [ ! -e /var/cache/man2html/man2html.swish++.index ] \
    && [ ! -e /var/cache/man2html/man2html.swish++.index.tmp ]; then
    db_get man2html/index_manpages || true
    db_stop || true
    if [ "$RET" = "true" ]; then
        tf=`tempfile -p 'm2h-' -s '.swish++.out'`
        echo "Running $INDEX_SCRIPT in the background to index your manpages"
        echo "(redirected to $tf)."
        $INDEX_SCRIPT 2>&1 > "$tf" &
    fi
else
    db_stop || true
fi

exit 0