1
0

clish_script_callback.c 487 B

123456789101112131415161718192021
  1. /*
  2. * clish_script_callback.c
  3. *
  4. *
  5. * Callback hook to action a shell script.
  6. */
  7. #include <stdio.h>
  8. #include <stdlib.h>
  9. #include "private.h"
  10. /*--------------------------------------------------------- */
  11. bool_t clish_script_callback(const clish_shell_t * shell, const char *script)
  12. {
  13. #ifdef DEBUG
  14. fprintf(stderr, "SYSTEM: %s\n", script);
  15. #endif /* DEBUG */
  16. return (0 == system(script)) ? BOOL_TRUE : BOOL_FALSE;
  17. }
  18. /*--------------------------------------------------------- */