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

set -e

if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then
  # XXX: We should use the copy method instead once available.
  cp -a $DPKG_ROOT/test-conffile $DPKG_ROOT/test-conffile.diverted
  dpkg-divert --package pkg-conff-divert --no-rename \
              --divert /test-conffile.diverted --add /test-conffile
fi