From 160525abdee84451b5551b5e33b7373b2d88235d Mon Sep 17 00:00:00 2001 From: Alexander Myltsev Date: Sun, 15 Jan 2023 18:30:57 +0400 Subject: [PATCH] ejudge.sh: pack image.bin inside the script. --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bc289ee..1ae7f1c 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,11 @@ run-nox: image.bin qemu-system-i386 -nographic -drive format=raw,file=$< -serial mon:stdio ejudge.sh: image.bin - echo >$@ "#!/bin/sh\nexec qemu-system-i386 -nographic -drive format=raw,file=$< -serial mon:stdio" + echo >$@ "#!/bin/sh" + echo >>$@ "base64 -d <<===EOF | gunzip >image.bin" + gzip <$^ | base64 >>$@ + echo >>$@ "===EOF" + echo >>$@ "exec qemu-system-i386 -nographic -drive format=raw,file=image.bin -serial mon:stdio" chmod +x $@ debug-boot-nox: image.bin mbr.elf