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