use std::env;
use std::fs::File;
use std::io::Write;
use std::path::Path;
fn main() {
let todo_file_path = env::var("TODO_FILE_PATH")
.unwrap_or_else(|_| { "todo.org".to_string()});
let output_directory = env::var("OUT_DIR")
.expect("Failed to retrieve OUT_DIR");
let destination_path = Path::new(&output_directory).join("file_path.rs");
let mut file = File::create(&destination_path)
.expect("Failed to create file_path.rs file.");
write!(file, "pub const TODO_FILE_PATH: &str = {:?};", todo_file_path)
.expect("Failed to write to file_path.rs file.");
}