From caf2267550a5db7aeefb3c66a4fc7c1801b3da48 Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Wed, 18 Dec 2024 11:47:56 -0600 Subject: add some contrib scripts Signed-off-by: Matt Strapp --- .gitignore | 5 ++++- contrib/run-in-parallel | 7 +++++++ contrib/run-one | 5 +++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 contrib/run-in-parallel create mode 100644 contrib/run-one diff --git a/.gitignore b/.gitignore index 41767ab..628da90 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,7 @@ Cargo.lock #.idea/ output.log -game.bin \ No newline at end of file +output.*.log + +game.bin +game.*.bin \ No newline at end of file diff --git a/contrib/run-in-parallel b/contrib/run-in-parallel new file mode 100644 index 0000000..2ded83c --- /dev/null +++ b/contrib/run-in-parallel @@ -0,0 +1,7 @@ +#!/bin/sh + +# Make sure that the program is up to date. +cargo build --release + +# Run the program in parallel and make sure the priority is low. +seq 1 "$(nproc)" | xargs -P 0 -I _ sh -c "nice -n 19 ./target/release/wwb game._.bin | tee -ai output._.log" \ No newline at end of file diff --git a/contrib/run-one b/contrib/run-one new file mode 100644 index 0000000..f062638 --- /dev/null +++ b/contrib/run-one @@ -0,0 +1,5 @@ +#!/bin/sh + +cargo build --release + +nice -n 19 ./target/release/wwb game.bin | tee -ai output.log -- cgit v1.2.3