skx / run-directory

A simple application inspired by `run-parts`.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 version you're using.

If you prefer you can fetch a binary from our release page.

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 which is used by the github-action-tester action.

Releases are automated in a similar fashion via .github/build, and the github-action-publish-binaries action.

Steve

About

A simple application inspired by `run-parts`.


Languages

Language:Go 76.3%Language:Shell 23.7%