From 0ab7fcc408bf0f851c9ea2f97adc8daecbf6b0be Mon Sep 17 00:00:00 2001 From: Zhang Junyang Date: Fri, 21 Jul 2023 12:17:12 +0800 Subject: [PATCH] Clean the iso directory before building boot image --- build/grub/scripts/build-grub-image.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/grub/scripts/build-grub-image.sh b/build/grub/scripts/build-grub-image.sh index 1d1770984..f63a83ea2 100755 --- a/build/grub/scripts/build-grub-image.sh +++ b/build/grub/scripts/build-grub-image.sh @@ -4,6 +4,11 @@ set -eux # Cargo passes the path to the built executable as the first argument. KERNEL=$1 +# Clean up the image directory +if [ -f target/iso_root ]; then + rm -rf target/iso_root +fi + # Copy the needed files into an ISO image. mkdir -p target/iso_root/boot cp $KERNEL target/iso_root/boot/jinux