aboutsummaryrefslogtreecommitdiffstats
path: root/archivers/epkg/pkg-install
blob: a741f2a6fef5d21d895abbe3358cf40dc3b841cc (plain) (blame)
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
#!/bin/sh

PKG_PREFIX=${PKG_PREFIX:-/usr/local}

if [ $# -ne 2 ]; then
    echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
    exit 1
fi

case $2 in
     POST-INSTALL)

        if [ ! -d "${PKG_PREFIX}/etc" ]; then
            echo "creating directory: ${PKG_PREFIX}/etc";
            mkdir -p "${PKG_PREFIX}/etc";
        fi

        if [ ! -f "${PKG_PREFIX}/etc/mkencap_environment" ]; then
            echo "installing: ${PKG_PREFIX}/etc/mkencap_environment";
            cp "${PKG_PREFIX}/etc/mkencap_environment.sample" "${PKG_PREFIX}/etc/mkencap_environment";
        fi
        ;;
esac

exit 0