Changes in uspace/app/bdsh/cmds/builtins/batch/batch.c [0262f180:81bc309] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/builtins/batch/batch.c
r0262f180 r81bc309 29 29 #include <stdio.h> 30 30 #include <stdlib.h> 31 #include <stdbool.h>32 #include <errno.h>33 31 #include "config.h" 34 32 #include "util.h" … … 46 44 if (level == HELP_SHORT) { 47 45 printf( 48 "\n batch [filename] [-c]\n"46 "\n batch [filename]\n" 49 47 " Issues commands stored in the file.\n" 50 48 " Each command must correspond to the single line in the file.\n\n"); … … 56 54 " separate groups of commands. There is no support for comments,\n" 57 55 " variables, recursion or other programming constructs - the `batch'\n" 58 " command is indeed very trivial.\n" 59 " If the filename is followed by -c, execution continues even if some\n" 60 " of the commands failed.\n\n"); 56 " command is indeed very trivial.\n\n"); 61 57 } 62 58 … … 69 65 { 70 66 unsigned int argc; 71 bool continue_despite_errors = false;72 67 73 68 /* Count the arguments */ … … 77 72 printf("%s - no input file provided.\n", cmdname); 78 73 return CMD_FAILURE; 79 }80 81 if (argc > 2) {82 if (str_cmp(argv[2], "-c") == 0)83 continue_despite_errors = true;84 74 } 85 75 … … 109 99 rc = process_input(&fusr); 110 100 /* fusr->line was freed by process_input() */ 111 if ((rc != EOK) && continue_despite_errors) {112 /* Mute the error. */113 rc = EOK;114 }115 101 } 116 102 if (rc == 0 && c != EOF) {
Note:
See TracChangeset
for help on using the changeset viewer.