OSDN Git Service

If there's a new root fs, delete the old one
authorLorenzo Colitti <lorenzo@google.com>
Sun, 11 May 2014 10:44:03 +0000 (19:44 +0900)
committerLorenzo Colitti <lorenzo@google.com>
Mon, 2 Feb 2015 08:47:28 +0000 (17:47 +0900)
Otherwise xz will refuse to overwrite it. Explicitly delete it
instead of passing -f to xz because that also forces a lot of
other things, not just file overwrite.

Change-Id: Iec3c73c9ae4775039eb9c3afed91bfaa4ebedb5d

tests/net_test/run_net_test.sh

index 8798e55..2bbd278 100755 (executable)
@@ -26,6 +26,8 @@ set -e
 # Check if we need to uncompress the disk image.
 # We use xz because it compresses better: to 42M vs 72M (gzip) / 62M (bzip2).
 if [ $ROOTFS.xz -nt $ROOTFS ]; then
+  echo "Deleting $ROOTFS" >&2
+  rm -f $ROOTFS
   echo "Uncompressing $ROOTFS.xz" >&2
   unxz --keep $ROOTFS.xz
 fi