Compare commits
No commits in common. "master" and "rust-rewrite" have entirely different histories.
master
...
rust-rewri
4 changed files with 4 additions and 23 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -336,7 +336,7 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "i3toolwait"
|
name = "i3toolwait"
|
||||||
version = "0.3.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"byteorder",
|
"byteorder",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "i3toolwait"
|
name = "i3toolwait"
|
||||||
version = "0.3.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
17
Makefile
17
Makefile
|
@ -1,17 +0,0 @@
|
||||||
EXEC := i3toolwait
|
|
||||||
INSTALL_BASE ?= /usr/local
|
|
||||||
|
|
||||||
default: target/debug/${EXEC}
|
|
||||||
release: target/release/${EXEC}
|
|
||||||
default: target/debug/${EXEC}
|
|
||||||
|
|
||||||
install: target/release/${EXEC}
|
|
||||||
install -Dm0755 -oroot -groot $< ${INSTALL_BASE}/bin/${EXEC}
|
|
||||||
|
|
||||||
target/release/${EXEC}:
|
|
||||||
@cargo build --release
|
|
||||||
|
|
||||||
target/debug/${EXEC}:
|
|
||||||
@cargo build
|
|
||||||
|
|
||||||
.PHONY: install
|
|
|
@ -2,7 +2,7 @@ use std::collections::HashMap;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
use anyhow::{Context, Result};
|
use anyhow::Result;
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
use log::{debug, info, warn};
|
use log::{debug, info, warn};
|
||||||
use tokio::io::AsyncReadExt;
|
use tokio::io::AsyncReadExt;
|
||||||
|
@ -167,9 +167,7 @@ async fn main() -> Result<()> {
|
||||||
tokio::io::stdin().read_to_string(&mut config).await?;
|
tokio::io::stdin().read_to_string(&mut config).await?;
|
||||||
} else {
|
} else {
|
||||||
tokio::fs::File::open(args.config.as_ref().unwrap())
|
tokio::fs::File::open(args.config.as_ref().unwrap())
|
||||||
.await.with_context(
|
.await?
|
||||||
|| format!("Failed to read config file {}", args.config.as_ref().unwrap().to_string_lossy())
|
|
||||||
)?
|
|
||||||
.read_to_string(&mut config)
|
.read_to_string(&mut config)
|
||||||
.await?;
|
.await?;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue