Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/cmds/builtins/batch/batch.c

    r0262f180 r81bc309  
    2929#include <stdio.h>
    3030#include <stdlib.h>
    31 #include <stdbool.h>
    32 #include <errno.h>
    3331#include "config.h"
    3432#include "util.h"
     
    4644        if (level == HELP_SHORT) {
    4745                printf(
    48                 "\n  batch [filename] [-c]\n"
     46                "\n  batch [filename]\n"
    4947                "  Issues commands stored in the file.\n"
    5048                "  Each command must correspond to the single line in the file.\n\n");
     
    5654                "  separate groups of commands. There is no support for comments,\n"
    5755                "  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");
    6157        }
    6258
     
    6965{
    7066        unsigned int argc;
    71         bool continue_despite_errors = false;
    7267
    7368        /* Count the arguments */
     
    7772                printf("%s - no input file provided.\n", cmdname);
    7873                return CMD_FAILURE;
    79         }
    80 
    81         if (argc > 2) {
    82                 if (str_cmp(argv[2], "-c") == 0)
    83                         continue_despite_errors = true;
    8474        }
    8575
     
    10999                                        rc = process_input(&fusr);
    110100                                        /* fusr->line was freed by process_input() */
    111                                         if ((rc != EOK) && continue_despite_errors) {
    112                                                 /* Mute the error. */
    113                                                 rc = EOK;
    114                                         }
    115101                                }
    116102                                if (rc == 0 && c != EOF) {
Note: See TracChangeset for help on using the changeset viewer.