From 8732a6f0b7e939d6453f9afac776705f1bec8cbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Autin?= Date: Fri, 21 Apr 2023 14:26:02 +0200 Subject: [PATCH] Added build.rs script - Executes make all - Moves the project logo to the documentation folder --- build.rs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 build.rs diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..900ea8c --- /dev/null +++ b/build.rs @@ -0,0 +1,26 @@ +//! Build script for BurritOS. +//! +//! Moves files from the assets folder to the target directory +//! and runs `make all`. + +use std::process::Command; + +fn main() { + let mut make_all = Command::new("make"); + make_all.arg("all"); + println!("{:?}", make_all.output().unwrap()); + + let mut create_target_folder = Command::new("mkdir"); + create_target_folder.args([ + "-p", + "target/doc/burritos/assets/" + ]); + println!("{:?}", create_target_folder.output().unwrap()); + + let mut copy_logo = Command::new("cp"); + copy_logo.args([ + "assets/logo/logo.svg", + "target/doc/burritos/assets/logo.svg" + ]); + println!("{:?}", copy_logo.output().unwrap()); +} \ No newline at end of file