mirror of
https://github.com/italicsjenga/valence.git
synced 2024-12-23 22:41:30 +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();
|
||
|
}
|