mb-dev 0.1.12

my dev cli tools
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use clap::Parser;
use mb_dev::shell;

#[derive(Parser, Debug)]
struct Args {
    src: String,
    dest: String,
}

const EXCLUDE_DIRS: &[&str] = &[".venv", "target", "node_modules", ".mypy_cache", ".pytest_cache"];

fn main() {
    let args = Args::parse();
    let exclude = EXCLUDE_DIRS.iter().map(|d| format!("--exlude={}/", d)).collect::<Vec<String>>().join(" ");
    shell(&format!("rsync -azvhP {} {} {}", exclude, args.src, args.dest));
}