mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-22 22:21:10 +02:00
Ensure builders work with cached output image.
If test image is present already, mod_image_for_test should succeed, even if the input image is missing. BUG=chromium-os:19087 TEST=Run x86-mario-release builder and verify it works now. Change-Id: If9729328120c7bbd9c1fffca26d6b1cddf2e980e Reviewed-on: http://gerrit.chromium.org/gerrit/5831 Reviewed-by: David James <davidjames@chromium.org> Tested-by: David James <davidjames@chromium.org>
This commit is contained in:
parent
c2474ae596
commit
e29e0448e2
@ -76,12 +76,6 @@ fi
|
||||
# Turn path into an absolute path.
|
||||
FLAGS_image=$(eval readlink -f "$FLAGS_image")
|
||||
|
||||
# Abort early if we can't find the image
|
||||
if [ ! -f "$FLAGS_image" ]; then
|
||||
echo "No image found at $FLAGS_image"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make sure anything mounted in the rootfs/stateful is cleaned up ok on exit.
|
||||
cleanup_mounts() {
|
||||
# Occasionally there are some daemons left hanging around that have our
|
||||
@ -173,6 +167,12 @@ if [ $FLAGS_inplace -eq $FLAGS_FALSE ]; then
|
||||
FLAGS_yes="$FLAGS_TRUE"
|
||||
fi
|
||||
|
||||
# Abort early if we can't find the image
|
||||
if [ ! -f "$FLAGS_image" ]; then
|
||||
echo "No image found at $FLAGS_image"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make sure this is really what the user wants, before nuking the device
|
||||
if [ $FLAGS_yes -ne $FLAGS_TRUE ]; then
|
||||
read -p "Modifying image $FLAGS_image for test; are you sure (y/N)? " SURE
|
||||
|
Loading…
x
Reference in New Issue
Block a user