summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAiden Gall <aiden@aidengall.xyz>2024-05-14 23:50:15 +0100
committerAiden Gall <aiden@aidengall.xyz>2024-05-14 23:50:15 +0100
commit882626965d7778cecd7ec0329e7f4a19f97d8218 (patch)
tree549e19058a8cda5eba86f2760684dcb8443b4633
parent93585dc4da3be099e1ffe7e757aa7caff2e1f013 (diff)
test file size of bootsector/kernel image
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 0dbfe31..3039d1d 100644
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ kernel/main.o: kernel/util.h
providence.img: ${OBJ}
${CC} ${LDFLAGS} $^ ${LDLIBS} -o $@
- @du -b $@
+ test "$$(wc -c $@ | cut -f1 -d' ')" -le 29696 || { rm -f $@ ; false ; }
truncate -s 29696 $@
%.o: %.c