os-xtask-utils 0.0.0

Program executation for xtask in os or bootloader project
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::{ext, CommandExt};
use std::{ffi::OsStr, process::Command};

ext!(def; Tar);

impl Tar {
    #[inline]
    pub fn xf(src: impl AsRef<OsStr>, dst: Option<impl AsRef<OsStr>>) -> Self {
        let mut tar = Self(Command::new("tar"));
        tar.arg("xf").arg(src).optional(&dst, |tar, dst| {
            tar.arg("-C").arg(dst);
        });
        tar
    }
}