summaryrefslogtreecommitdiffstats
path: root/tests/t-unpack-divert-nowarn/pkg-divert-unpacking/DEBIAN/preinst
blob: a61ad117f058b3eea8df95ffec20bbbc0e236c01 (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh

set -e

if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then
  dpkg-divert --quiet --package pkg-divert-unpacking --rename \
              --divert /test-file.diverted --add /test-file 2>&1 | \
    grep "warning: " && echo "Fail: warning in output" && exit 1 ||
    echo Pass
fi