mlasevich / run-parts

A portable and powerful implementation of the run-parts command

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NAME

run-parts - run executable files and scripts in a directory.

SYNOPSIS

run-parts [OPTIONS] [--] DIRECTORY

DESCRIPTION

--test

Print program names, but don't run them.

--list

List all matching files, including non-executables, but don't run anything.

-v, --verbose

Print the name of each program before running it.

--exit-on-error

If a program fails, terminate early.

--new-session

Run each program in a new process, so if run-parts is terminated, the programs in progress will continue.

--regex=REGEX

Only run those programs matching a regular expression.

-u UMASK, --umask=UMASK

Set the umask for the scripts.

-a ARGUMENT, --arg=ARGUMENT

Provide an argument to be given to each program. This option may be provided multiple times.

--ignore-suffixes=SUFFIX1,[SUFFIX2,...]

Ignore any files ending with any entries in the given comma-delimited list of suffixes.

-h, --help

Show a list of options.

-V, --version

Show version information.

HISTORY

The run-parts command is an ad-hoc unstandardized tool with wildly varying implementations. The main two are the following:

Red Hat

Implemented in bash, has a hard-coded list of prohibited suffixes, and only implements the --list option.

Debian/Ubuntu

More commonly used, this implementation is in C, and provides many more features.

Neither implementation is really appropriate for general-purpose usage. This implementation is written for the Wolf Box Linux project, and is intended to entirely subsume the features of the above two, while working in portable POSIX shell.

AUTHOR

Andrew Aldridge

COPYRIGHT

The MIT License (MIT)

Copyright (c) 2014 Andrew Aldridge <i80and@foxquill.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

A portable and powerful implementation of the run-parts command

License:MIT License


Languages

Language:Shell 88.8%Language:Makefile 11.2%