summaryrefslogtreecommitdiff
path: root/debian/gnubg.postinst
blob: 4e5cda5ddf614c341b1e8c9a59b7b524bbf174de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
#
# Build the bearoff databases after install if requested.

set -e

if [ "configure" = "$1" ] || [ "reconfigure" = "$1" ] ; then
    . /usr/share/debconf/confmodule || exit
    db_version 2.0
    db_get gnubg/build-bearoffs

    if [ "$RET" = "true" ] ; then
        if [ ! -f "/var/lib/gnubg/gnubg_ts0.bd" ] ; then
            echo 'Building two-sided bearoff database' \
                '(this may take several minutes)' >&2
            /usr/games/makebearoff -t 6x6 \
                -f /var/lib/gnubg/gnubg_ts0.bd > /dev/null 2>&1
        fi
    fi
fi

#DEBHELPER#