mirror of
https://github.com/RubyMetric/chsrc
synced 2025-07-02 01:32:45 +08:00
parent
7cfae8bac8
commit
5b7e70853a
@ -365,10 +365,22 @@ not_root:
|
|||||||
static void
|
static void
|
||||||
chsrc_run (const char *cmd)
|
chsrc_run (const char *cmd)
|
||||||
{
|
{
|
||||||
puts ("~~~~~~~~~~~");
|
xy_info_remarkably (App_Name, "运行", cmd);
|
||||||
puts (xy_2strjoin ("运行 ", xy_str_to_blue (cmd)));
|
int status = system (cmd);
|
||||||
system (cmd);
|
if (0==status)
|
||||||
|
{
|
||||||
|
xy_succ_remarkably (App_Name, "运行", "命令执行成功");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
char buf[8] = {0};
|
||||||
|
itoa(status, buf, 10);
|
||||||
|
char *str = xy_2strjoin ("命令执行失败,返回码 ", buf);
|
||||||
|
xy_error_remarkably (App_Name, "运行", str);
|
||||||
|
}
|
||||||
|
puts ("");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
chsrc_check_file (const char *path)
|
chsrc_check_file (const char *path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user