~/website

website/src/main.rs -rw-r--r-- 513 B
0f8635bc — arthurmelton move static to public 2 years ago

            
2e51be12 arthurmelton
2fb4d353 arthurmelton
d6b497e2 Arthur Melton
2e51be12 arthurmelton
2fb4d353 arthurmelton
2e51be12 arthurmelton
2fb4d353 arthurmelton
2e51be12 arthurmelton
5b96ebd5 arthurmelton
2e51be12 arthurmelton
5b96ebd5 arthurmelton
2e51be12 arthurmelton
5b96ebd5 arthurmelton
0f8635bc arthurmelton
d9fbf244 Arthur Melton
d6b497e2 Arthur Melton
d9fbf244 Arthur Melton
4ea5743d arthurmelton
2fb4d353 arthurmelton
d6b497e2 Arthur Melton
d9fbf244 Arthur Melton
2fb4d353 arthurmelton
0f8635bc arthurmelton
188f6383 Arthur Melton
9226e0e3 Arthur Melton
188f6383 Arthur Melton
2e51be12 arthurmelton
0f8635bc arthurmelton
2fb4d353 arthurmelton
2e51be12 arthurmelton
2fb4d353 arthurmelton
2e51be12 arthurmelton
2fb4d353 arthurmelton
2e51be12 arthurmelton
9226e0e3 Arthur Melton
2e51be12 arthurmelton
2fb4d353 arthurmelton
5b96ebd5 arthurmelton
2e51be12 arthurmelton
073f1644 Arthur Melton
2e51be12 arthurmelton
073f1644 Arthur Melton
2e51be12 arthurmelton
073f1644 Arthur Melton
2e51be12 arthurmelton
073f1644 Arthur Melton
2e51be12 arthurmelton
073f1644 Arthur Melton
2e51be12 arthurmelton
073f1644 Arthur Melton
2e51be12 arthurmelton
d6b497e2 Arthur Melton
77beca8c Arthur Melton
d6b497e2 Arthur Melton
d9fbf244 Arthur Melton
d6b497e2 Arthur Melton
8bbbbea3 Arthur Melton
d6b497e2 Arthur Melton
d9fbf244 Arthur Melton
c0811f75 Arthur Melton
d6b497e2 Arthur Melton
8bbbbea3 Arthur Melton
d6b497e2 Arthur Melton
d9fbf244 Arthur Melton
d6b497e2 Arthur Melton
d9fbf244 Arthur Melton
d6b497e2 Arthur Melton
d9fbf244 Arthur Melton
0fd9e0c1 Arthur Melton
2e51be12 arthurmelton
5b96ebd5 arthurmelton
2fb4d353 arthurmelton
cd00e4d6 Arthur Melton
2fb4d353 arthurmelton
4ea5743d arthurmelton





















































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
use walkdir::WalkDir;
use std::fs;
use std::path::Path;

fn main() {
    let _ = fs::create_dir("public");
    for e in WalkDir::new("static").into_iter().filter_map(|e| e.ok()) {
        if e.metadata().unwrap().is_file() {
            let mut path = e.path();
            path = path.strip_prefix("static/").unwrap(); // should never fail
            fs::copy(e.path(), Path::new("public").join(path)).expect(&format!("failed to copy static/{} to public/{}", path.display(), path.display()));
        }
    }
}