| 1 |
int g_dryrun; // set to 1 if envvar DRYRUN was set in main() |
| 2 |
|
| 3 |
void runP(int testValue, string cmd) |
| 4 |
{ |
| 5 |
if (g_dryrun) |
| 6 |
printf(cmd, "\n"); |
| 7 |
else |
| 8 |
{ |
| 9 |
fprintf << "/tmp/commands" << cmd << '\n'; |
| 10 |
system(testValue, cmd); |
| 11 |
} |
| 12 |
} |
| 13 |
|
| 14 |
void run(string cmd) |
| 15 |
{ |
| 16 |
runP(P_CHECK, cmd); |
| 17 |
} |