mirror of
https://github.com/italicsjenga/valence.git
synced 2024-12-24 23:11:29 +11:00
22 lines
514 B
Rust
22 lines
514 B
Rust
|
use std::path::Path;
|
||
|
|
||
|
fn main() {
|
||
|
let current = std::env::current_dir().unwrap();
|
||
|
println!("current directory: {}", current.display());
|
||
|
|
||
|
let src = current.join(Path::new("src/playground.template.rs"));
|
||
|
let dst = current.join(Path::new("src/playground.rs"));
|
||
|
|
||
|
if dst.exists() {
|
||
|
println!("{dst:?} already exists, skipping");
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
if !src.exists() {
|
||
|
println!("{src:?} does not exist, skipping");
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
std::fs::copy(src, dst).unwrap();
|
||
|
}
|