mirror of
https://github.com/RubyMetric/chsrc.git
synced 2025-04-14 15:10:41 +08:00
parent
7cfae8bac8
commit
5b7e70853a
@ -365,11 +365,23 @@ not_root:
|
||||
static void
|
||||
chsrc_run (const char *cmd)
|
||||
{
|
||||
puts ("~~~~~~~~~~~");
|
||||
puts (xy_2strjoin ("运行 ", xy_str_to_blue (cmd)));
|
||||
system (cmd);
|
||||
xy_info_remarkably (App_Name, "运行", cmd);
|
||||
int status = 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
|
||||
chsrc_check_file (const char *path)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user