pmbs 0.1.1

(每分钟) 创建 btrfs 快照, 并自动清理. (Make btrfs snapshot (every minute), and auto clean)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! 调用执行命令 (shell)
use std::process::Command;

use log::{error, info};

/// 执行 shell 命令
pub fn sh_run(mut c: Command) -> i32 {
    info!("run {:?}", c);

    let code = c.status().unwrap().code().unwrap();
    if 0 != code {
        error!("exit code {}", code);
    }
    code
}