aboutsummaryrefslogtreecommitdiff
path: root/examples/B91dpkg-i
blob: acc1cdda7e52a3b03f8f945995db3fc2de34bb1f (plain)
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
26
27
28
29
#!/bin/bash
# example file to be used with --hookdir
#
# try to install the resulting debs.

echo "Trying to install resulting packages and test upgrades"
set -ex

BUILDDIR="${BUILDDIR:-/tmp/buildd}"

PKGNAMES=$(cd "$BUILDDIR" && ls -1 *.deb | sed 's/_.*$//' )

# install-remove check
dpkg -i "$BUILDDIR"/*.deb
dpkg --remove $PKGNAMES

# install-purge check
dpkg -i "$BUILDDIR"/*.deb
dpkg --purge $PKGNAMES

# upgrade-remove check
apt-get install -y "${APTGETOPT[@]}"  $PKGNAMES || true
dpkg -i "$BUILDDIR"/*.deb
dpkg --remove $PKGNAMES

# upgrade-purge check
apt-get install -y "${APTGETOPT[@]}" $PKGNAMES || true
dpkg -i "$BUILDDIR"/*.deb
dpkg --purge $PKGNAMES