diff options
Diffstat (limited to '')
| -rw-r--r-- | src/performcmd.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/performcmd.cpp b/src/performcmd.cpp index 21ba737..724f42b 100644 --- a/src/performcmd.cpp +++ b/src/performcmd.cpp | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | #include "builder.h" | 2 | #include "builder.h" |
| 3 | 3 | ||
| 4 | PerformCmd::PerformCmd( const char *sCmd, const char *sTarget ) : | 4 | PerformCmd::PerformCmd( const char *sCmd, const char *sTarget ) : |
| 5 | Perform( sTarget ), | ||
| 5 | sCommand( sCmd ), | 6 | sCommand( sCmd ), |
| 6 | sTarget( sTarget ) | ||
| 7 | { | 7 | { |
| 8 | } | 8 | } |
| 9 | 9 | ||
| @@ -14,6 +14,11 @@ PerformCmd::~PerformCmd() | |||
| 14 | void PerformCmd::execute( class Builder &bld ) | 14 | void PerformCmd::execute( class Builder &bld ) |
| 15 | { | 15 | { |
| 16 | printf("%s\n", sCommand.getString() ); | 16 | printf("%s\n", sCommand.getString() ); |
| 17 | system( sCommand.getString() ); | 17 | int ret; |
| 18 | if( (ret = system( sCommand.getString() )) != 0 ) | ||
| 19 | { | ||
| 20 | printf("Error code: %d\n", WEXITSTATUS(ret) ); | ||
| 21 | exit( WEXITSTATUS(ret) ); | ||
| 22 | } | ||
| 18 | } | 23 | } |
| 19 | 24 | ||
