From d4670cb85db7a5e8cef647a41eb02736cc499e82 Mon Sep 17 00:00:00 2001 From: able Date: Tue, 13 Jun 2023 21:03:09 -0500 Subject: [PATCH] REPBUILD: Minor todo fix --- repbuild/src/main.rs | 12 ++++++++++-- system.toml | 2 ++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/repbuild/src/main.rs b/repbuild/src/main.rs index be8bf50e..4ca31da1 100644 --- a/repbuild/src/main.rs +++ b/repbuild/src/main.rs @@ -1,3 +1,5 @@ +use std::fs; + use { error_stack::{bail, report, Context, IntoReport, Result, ResultExt}, fatfs::{FileSystem, FormatVolumeOptions, FsOptions, ReadWriteSeek}, @@ -8,8 +10,14 @@ fn main() -> Result<(), Error> { env_logger::init(); let mut args = std::env::args(); args.next(); - // TODO: work on adding in system.toml support - // TODO: check the disk.img time and system.toml time and if system.toml is higher then rebuild the disk + + let disk_meta = fs::metadata("target/disk.img").unwrap(); + let config_meta = fs::metadata("system.toml").unwrap(); + + if disk_meta.modified().unwrap() < config_meta.modified().unwrap() { + // TODO: work on adding in system.toml support + // TODO: rebuild the disk + } match args.next().as_deref() { Some("build" | "b") => { diff --git a/system.toml b/system.toml index 7cfb5ea4..4b8ab024 100644 --- a/system.toml +++ b/system.toml @@ -1,6 +1,8 @@ [boot] # This package must be installed system wide init = "init_server" + + [boot.limine] default_entry = 1 timeout = 0