Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skx/run-directory
A simple application inspired by `run-parts`.
https://github.com/skx/run-directory
cli golang run-parts utility
Last synced: 18 days ago
JSON representation
A simple application inspired by `run-parts`.
- Host: GitHub
- URL: https://github.com/skx/run-directory
- Owner: skx
- Created: 2019-09-05T09:19:47.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-24T06:07:35.000Z (about 5 years ago)
- Last Synced: 2024-10-03T10:12:39.032Z (about 1 month ago)
- Topics: cli, golang, run-parts, utility
- Language: Go
- Size: 10.7 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# run-directory
This project is a naive port of `run-parts` to golang.
## About run-parts
`run-parts` executes every (executable) file in a directory, in order, it is usually shipped with a system cron-package where it is used, but it is also a useful command which users can use in their own shell-scripts. In the case of `cron` it is often used to execute a series of scripts, for example you might have a directory of files to be run every hour, and that could be achieved via :
$ run-parts /etc/cron.hourly/
# Motivation
The Debian version of run-parts allows processing to terminate if one of the scripts fails, but unfortunately the CentOS version of `run-parts` doesn't support this ability.
# Installation
There are two ways to install this project from source, which depend on the version of the [go](https://golang.org/) version you're using.
If you prefer you can fetch a binary from [our release page](https://github.com/skx/run-directory/releases).
## Build without Go Modules (Go before 1.11)
go get -u github.com/skx/run-directory
## Build with Go Modules (Go 1.11 or higher)
git clone https://github.com/skx/run-directory
cd run-directory
go install# Github Setup
This repository is configured to run tests upon every commit, and when pull-requests are created/updated. The testing is carried out via [.github/run-tests.sh](.github/run-tests.sh) which is used by the [github-action-tester](https://github.com/skx/github-action-tester) action.
Releases are automated in a similar fashion via [.github/build](.github/build), and the [github-action-publish-binaries](https://github.com/skx/github-action-publish-binaries) action.
Steve