Skip to content

A portable and powerful implementation of the run-parts command

License

Notifications You must be signed in to change notification settings

wolfbox/run-parts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 <[email protected]>

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published