pub fn runcmd<S: AsRef<Path>>(src_dir: S,cmdname: &str,params: &[&str]) {
    let tmp_dir = TempDir::new("meku-run").unwrap();
    build(&src_dir,tmp_dir.path());

    let mut cmd = Command::new(cmdname);
    for param in params.iter()
        .map(|p|
            if *p == "%{}"
                {tmp_dir.path().to_str().unwrap()}
            else {
                *p
            }) {
        cmd.arg(param);
    }
    println!("Executing {:?}",cmd);
    cmd.status().unwrap();
}
/// Does the same as executing the executable with `meku run <cmdname> <params>...`
Does the same as executing the executable with `meku run  ...`
Does the same as executing the executable with ` meku run ... `
pub fn runcmd<S: AsRef<Path>>(src_dir: S,cmdname: &str,params: &[&str]) {
    let tmp_dir = TempDir::new("meku-run").unwrap();
    build(&src_dir,tmp_dir.path());
    let mut cmd = Command::new(cmdname);
    for param in params.iter()
        .map(|p|
            if *p == "%{}"
                {tmp_dir.path().to_str().unwrap()}
            else {
                *p
            }) {
        cmd.arg(param);
    }
    println!("Executing {:?}",cmd);
    cmd.status().unwrap();
}
pub fn runcmd < S : AsRef < Path > > ( src_dir : S , cmdname : & str , params : & [ & str ] ) { let tmp_dir = TempDir :: new ( " " ) . unwrap ( ) ; build ( & src_dir , tmp_dir . path ( ) ) ; let mut cmd = Command :: new ( cmdname ) ; for param in params . iter ( ) . map ( | p | if * p == " " { tmp_dir . path ( ) . to_str ( ) . unwrap ( ) } else { * p } ) { cmd . arg ( param ) ; } println ! ( " " cmd ) ; cmd . status ( ) . unwrap ( ) ; }
Does the same as executing the executable with `meku run <cmdname> <params>...`
Does the same as executing the executable with ` meku run <cmdname > <params > ... `
src_dir
S
cmdname
&str
params
&[&str]
src_dir
S
cmdname
&str
params
&[&str]