mirror of
https://github.com/gnu4cn/rust-lang-zh_CN.git
synced 2026-08-19 12:43:28 +08:00
Added 'src/main.rs'
This commit is contained in:
16
src/main.rs
Normal file
16
src/main.rs
Normal file
@@ -0,0 +1,16 @@
|
||||
use std::process::Command;
|
||||
|
||||
fn main() -> std::io::Result<()> {
|
||||
// Invoke mdbook build in the directory containing book.toml
|
||||
let status = Command::new("mdbook")
|
||||
.arg("build")
|
||||
.status()?;
|
||||
|
||||
if status.success() {
|
||||
println!("PDF successfully generated in book/pdf/output.pdf");
|
||||
} else {
|
||||
eprintln!("Failed to generate PDF");
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user