-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add build script to copy README for rsdoc
- Loading branch information
1 parent
2a37295
commit d10577a
Showing
2 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
use std::env::var; | ||
use std::error::Error; | ||
use std::fs::copy; | ||
use std::path::PathBuf; | ||
|
||
fn main() -> Result<(), Box<dyn Error>> { | ||
let cwd = PathBuf::from(var("CARGO_MANIFEST_DIR").unwrap()); | ||
let root = cwd.parent().unwrap(); | ||
let readme = root.join("README.md"); | ||
|
||
if readme.exists() { | ||
copy(root.join("README.md"), cwd.join("README.md"))?; | ||
} | ||
|
||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#![doc = include_str!("../README.md")] | ||
#![doc = include_str!("README.md")] | ||
|
||
mod inject; | ||
mod inject_keyed; | ||
|