about summary refs log tree commit diff
path: root/src/tools/rustbook
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2017-02-09 14:44:39 -0500
committerSteve Klabnik <steve@steveklabnik.com>2017-02-13 13:41:20 -0500
commit775726092eaa4d0e0e397e9032467c2d1d06ed37 (patch)
tree0c8aa6f12a7300a9669a261bf2f0cbae1e55a1ce /src/tools/rustbook
parent626cf3a263dcac94c88910a6a67018e82b564c75 (diff)
downloadrust-775726092eaa4d0e0e397e9032467c2d1d06ed37.tar.gz
rust-775726092eaa4d0e0e397e9032467c2d1d06ed37.zip
Add exceptions to tidy
We've decided that these deps are okay.
Diffstat (limited to 'src/tools/rustbook')
-rw-r--r--src/tools/rustbook/src/main.rs25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/tools/rustbook/src/main.rs b/src/tools/rustbook/src/main.rs
index 837c934934a..b77baed5326 100644
--- a/src/tools/rustbook/src/main.rs
+++ b/src/tools/rustbook/src/main.rs
@@ -1,3 +1,13 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+//
 extern crate mdbook;
 #[macro_use]
 extern crate clap;
@@ -11,19 +21,21 @@ use clap::{App, ArgMatches, SubCommand, AppSettings};
 
 use mdbook::MDBook;
 
-const NAME: &'static str = "rustbook";
-
 fn main() {
-    // Create a list of valid arguments and sub-commands
-    let matches = App::new(NAME)
+    let d_message = "-d, --dest-dir=[dest-dir]
+'The output directory for your book{n}(Defaults to ./book when omitted)'";
+    let dir_message = "[dir]
+'A directory for your book{n}(Defaults to Current Directory when omitted)'";
+
+    let matches = App::new("rustbook")
                     .about("Build a book with mdBook")
                     .author("Steve Klabnik <steve@steveklabnik.com>")
                     .version(&*format!("v{}", crate_version!()))
                     .setting(AppSettings::SubcommandRequired)
                     .subcommand(SubCommand::with_name("build")
                         .about("Build the book from the markdown files")
-                        .arg_from_usage("-d, --dest-dir=[dest-dir] 'The output directory for your book{n}(Defaults to ./book when omitted)'")
-                        .arg_from_usage("[dir] 'A directory for your book{n}(Defaults to Current Directory when omitted)'"))
+                        .arg_from_usage(d_message)
+                        .arg_from_usage(dir_message))
                     .get_matches();
 
     // Check which subcomamnd the user ran...
@@ -76,4 +88,3 @@ fn get_book_dir(args: &ArgMatches) -> PathBuf {
         env::current_dir().unwrap()
     }
 }
-