]> git.lizzy.rs Git - rust.git/blob - build.rs
Merge pull request #122 from cassiersg/fix-mod
[rust.git] / build.rs
1 // Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 // Build script. Just copies default.toml from the src to the target dir.
12
13 use std::env;
14 use std::path::{Path, PathBuf};
15
16 fn main() {
17     let in_file = Path::new("src/default.toml");
18
19     let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
20     let mut out_file = PathBuf::new();
21     out_file.push(manifest_dir);
22     out_file.push("default.toml");
23
24     std::fs::copy(in_file, out_file).unwrap();
25 }