From 1942c8509b08ac09c0b6099c709f3667b527cc72 Mon Sep 17 00:00:00 2001 From: mpl Date: Tue, 20 Nov 2012 16:19:50 +0100 Subject: [PATCH] dev-server: when wiping, initialize blobserver with blobs in ./dev-server-template Change-Id: I49f9c861daecfdc5a32fed4a9e53e188e2cc0003 --- dev-server | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dev-server b/dev-server index e4edf1bb7..f822a4ffc 100755 --- a/dev-server +++ b/dev-server @@ -145,6 +145,12 @@ $ENV{CAMLI_PORT} = $port; $ENV{CAMLI_SECRET_RING} = "$Bin/pkg/jsonsign/testdata/test-secring.gpg"; $ENV{CAMLI_DBNAME} = $DBNAME; +my $templatedir = "$Bin/dev-server-template"; +if ($opt_wipe && -d $templatedir) { + my $blobs = "$ENV{CAMLI_ROOT}/sha1"; + system("cp", "-a", $templatedir, $blobs) and die "Failed to cp template blobs.\n"; +} + # To use resources from disk, instead of the copies linked into the # binary: unless ($opt_staticres) {