Add book.toml to tools/unstable, add copy_book_toml to scipt

This commit is contained in:
Bastian Gruber 2019-04-06 11:57:02 +02:00
parent 20dbf28624
commit 1c3979ca16
2 changed files with 8 additions and 0 deletions

View File

@ -1,2 +1,3 @@
[book]
title = "The Rust Unstable Book"
author = "The Rust Community"

View File

@ -116,6 +116,11 @@ fn copy_recursive(path: &Path, to: &Path) {
}
}
fn copy_book_toml(path: &Path) {
let mut file = t!(File::create(&path.join("book.toml")));
t!(file.write_fmt(format_args!(include_str!("book.toml"));
}
fn main() {
let src_path_str = env::args_os().skip(1).next().expect("source path required");
let dest_path_str = env::args_os().skip(2).next().expect("destination path required");
@ -141,4 +146,6 @@ fn main() {
copy_recursive(&doc_src_path, &dest_path);
generate_summary(&dest_path, &lang_features, &lib_features);
copy_book_toml(&dest_path);
}