diff options
Diffstat (limited to 'tests/db-regen')
-rwxr-xr-x | tests/db-regen | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/db-regen b/tests/db-regen new file mode 100755 index 0000000..f4e83f2 --- /dev/null +++ b/tests/db-regen @@ -0,0 +1,34 @@ +#!/bin/sh +# +# Regenerate the local dpkg db +# +# Copyright © 2011-2012 Guillem Jover <guillem@debian.org> +# + +dbdir=${1:-dpkgdb} +instdir=${2:-dpkginst} + +mkdir -p $instdir + +rm -f $dbdir/arch +rm -f $dbdir/status* +rm -f $dbdir/available* +rm -f $dbdir/diversions* +rm -f $dbdir/statoverride* +rm -f $dbdir/info/format +rm -rf $dbdir/parts +rm -rf $dbdir/updates +rm -rf $dbdir/triggers + +mkdir -p $dbdir +touch $dbdir/lock +touch $dbdir/status +touch $dbdir/available +touch $dbdir/diversions +touch $dbdir/statoverride +mkdir -p $dbdir/info +mkdir $dbdir/parts +mkdir $dbdir/updates +mkdir $dbdir/triggers +touch $dbdir/triggers/Lock +touch $dbdir/triggers/Unincorp |