summaryrefslogtreecommitdiffstats
path: root/tests/t-triggers/pkg-trig-cmd/DEBIAN/postinst
blob: 3975be087f1ffca79232a973211f0e1c2d4c724c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

set -e

if [ -e "$DPKG_ROOT/trigger-$DPKG_MAINTSCRIPT_NAME" ]; then
    if [ -e "$DPKG_ROOT/trigger-noawait" ]; then
	echo "Executing 'dpkg-trigger --no-await a-trigger' from '$0 $1'"
	dpkg-trigger --no-await a-trigger
    elif [ -e "$DPKG_ROOT/trigger-await" ]; then
	echo "Executing 'dpkg-trigger --await a-trigger' from '$0 $1'"
	dpkg-trigger --await a-trigger
    else
	echo "Executing 'dpkg-trigger a-trigger' from '$0 $1'"
	dpkg-trigger a-trigger
    fi
fi