From b68984dc7fa2535a77a778d6b40167908726911f Mon Sep 17 00:00:00 2001 From: Erin Date: Thu, 8 Dec 2022 21:31:54 +0100 Subject: [PATCH] moved stuff around --- .github/workflows/rust.yml | 22 ---------------------- repbuild/src/main.rs | 16 ++++++++-------- 2 files changed, 8 insertions(+), 30 deletions(-) delete mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml deleted file mode 100644 index e7afbac..0000000 --- a/.github/workflows/rust.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Build - -on: - - push - - pull_request - -env: - CARGO_TERM_COLOR: always - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - components: rust-src - - uses: actions-rs/cargo@v1 - with: - command: repbuild - args: run diff --git a/repbuild/src/main.rs b/repbuild/src/main.rs index f376e5a..48d25dc 100644 --- a/repbuild/src/main.rs +++ b/repbuild/src/main.rs @@ -70,7 +70,7 @@ fn main() -> Result<(), Box> { { fs::remove_dir_all("./limine"); fs::remove_dir_all("./disk"); - fs::remove_file("./disk.img"); + fs::remove_file("./target/disk.img"); } // Build ableOS in release mode @@ -100,7 +100,7 @@ fn main() -> Result<(), Box> { println!("{}", "Allocating new disk image".bold()); Command::new("fallocate") - .args(["-l", "256M", "disk.img"]) + .args(["-l", "256M", "./target/disk.img"]) .status() .unwrap(); @@ -108,7 +108,7 @@ fn main() -> Result<(), Box> { let dbus_conn = zbus::blocking::Connection::system()?; // Setup loop device - let disk_img = File::options().read(true).write(true).open("disk.img")?; + let disk_img = File::options().read(true).write(true).open("./target/disk.img")?; let loopdev = udisks::manager::UDisks2ManagerProxyBlocking::new(&dbus_conn)? .loop_setup( disk_img.as_raw_fd().into(), @@ -179,7 +179,7 @@ fn main() -> Result<(), Box> { println!("{}", "Deploying limine".bold()); Command::new("./limine/limine-deploy") - .arg("./disk.img") + .arg("./target/disk.img") .status() .unwrap(); } @@ -261,7 +261,7 @@ fn main() -> Result<(), Box> { // Setup loopback device for disk.img, with partitions // FIXME: don't do ths if running without changes // Setup loop device - let disk_img = File::options().read(true).write(true).open("disk.img")?; + let disk_img = File::options().read(true).write(true).open("./target/disk.img")?; let dbus_conn = zbus::blocking::Connection::system()?; let loopdev = udisks::manager::UDisks2ManagerProxyBlocking::new(&dbus_conn)? .loop_setup( @@ -311,7 +311,7 @@ fn main() -> Result<(), Box> { Command::new("qemu-system-x86_64") .args(["-device", "piix4-ide,id=ide"]) .arg("-drive") - .arg("file=./disk.img,format=raw,if=none,id=disk") + .arg("file=./target/disk.img,format=raw,if=none,id=disk") .args(["-device", "ide-hd,drive=disk,bus=ide.0"]) // .arg("--nodefaults") .args(["-cpu", "Broadwell-v3"]) @@ -339,7 +339,7 @@ fn main() -> Result<(), Box> { // Setup loopback device for disk.img, with partitions // FIXME: don't do ths if running without changes - let disk_img = File::options().read(true).write(true).open("disk.img")?; + let disk_img = File::options().read(true).write(true).open("./target/disk.img")?; let dbus_conn = zbus::blocking::Connection::system()?; let loopdev = udisks::manager::UDisks2ManagerProxyBlocking::new(&dbus_conn)? .loop_setup( @@ -386,7 +386,7 @@ fn main() -> Result<(), Box> { Command::new("qemu-system-x86_64") .args(["-device", "piix4-ide,id=ide"]) .arg("-drive") - .arg("file=./disk.img,format=raw,if=none,id=disk") + .arg("file=./target/disk.img,format=raw,if=none,id=disk") .args(["-device", "ide-hd,drive=disk,bus=ide.0"]) // .arg("--nodefaults") .args(["-cpu", "Broadwell-v3"])