auto/config: preserve germinate-output directory when removing config

Germinate doesn't take very long at all to run but downloading the
indices it operates on can take a while and nothing else in auto/config
does so not doing it every time you run "lb config" can be a real time
saver.

The code that invokes germinate already checked if the output was
already there but it was unconditionally deleted by the time control got
to that point.
This commit is contained in:
Michael Hudson-Doyle 2022-05-24 12:43:36 +12:00
parent 47b93e2349
commit ed38882219
2 changed files with 15 additions and 1 deletions

7
debian/changelog vendored
View File

@ -1,3 +1,10 @@
livecd-rootfs (2.765) UNRELEASED; urgency=medium
* auto/config: preserve germinate-output directory when removing config to
speed up local iteration.
-- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Tue, 24 May 2022 12:42:10 +1200
livecd-rootfs (2.764) jammy; urgency=medium
[ Michał Sawicz ]

View File

@ -1,7 +1,14 @@
#! /bin/sh
set -e
rm -rf config
if [ -e config/germinate-output ]; then
mv -T config/germinate-output germ-tmp
rm -rf config
mkdir config
mv -T germ-tmp config/germinate-output
else
rm -rf config
fi
echo "Building on $(hostname --fqdn)"