Skip to content

Commit

Permalink
Minor cleanup to the code to bring it in line with our coding standards
Browse files Browse the repository at this point in the history
  • Loading branch information
TGWolf committed Feb 16, 2021
1 parent 108a277 commit 177abb0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@ All notable changes to this project will be documented in this file.

This changelog was automatically generated using [Caretaker](https://github.com/DevelopersToolbox/caretaker) by [Wolf Software](https://github.com/WolfSoftware)

### [v0.1.1](https://github.com/GitToolbox/git-hook-multiplexer/compare/v0.1.0...v0.1.1)

> Released on February, 16th 2021
- Minor cleanup to the code to bring it in line with our coding standards [`[head]`](https://github.com/GitToolbox/git-hook-multiplexer/commit/)

### [v0.1.0](https://github.com/GitToolbox/git-hook-multiplexer/releases/v0.1.0)

> Released on February, 10th 2021
- The initial commit [`[head]`](https://github.com/GitToolbox/git-hook-multiplexer/commit/)
- The initial commit [`[108a277]`](https://github.com/GitToolbox/git-hook-multiplexer/commit/108a277a368b6e0924663bf16c73dbef0abea46e)

2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0
0.1.1
11 changes: 9 additions & 2 deletions src/multiplexer
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ EXIT_FAILURE=1
# Run some basic checks to make sure everything looks right. #
# ---------------------------------------------------------------------------------------- #

function run_pre_checks()
function run_pre_checks
{
if [[ ! -d "${HOOKS_DIR}" ]]; then
warn "The hook directory ${HOOKS_DIR} doesn't exist - skipping"
Expand Down Expand Up @@ -110,6 +110,7 @@ function process_hooks()
# -------------------------------------------------------------------------------- #
# Show the user a success message. #
# -------------------------------------------------------------------------------- #

function success()
{
local message="${1:-}"
Expand All @@ -124,6 +125,7 @@ function success()
# -------------------------------------------------------------------------------- #
# Show the user a warning message. #
# -------------------------------------------------------------------------------- #

function warn()
{
local message="${1:-}"
Expand All @@ -138,6 +140,7 @@ function warn()
# -------------------------------------------------------------------------------- #
# Show the user a failure message. #
# -------------------------------------------------------------------------------- #

function fail()
{
local message="${1:-}"
Expand All @@ -152,6 +155,7 @@ function fail()
# -------------------------------------------------------------------------------- #
# Show the user an information message. #
# -------------------------------------------------------------------------------- #

function info()
{
local message="${1:-}"
Expand All @@ -166,6 +170,7 @@ function info()
# -------------------------------------------------------------------------------- #
# Center some text on the screen. #
# -------------------------------------------------------------------------------- #

function center_text()
{
textsize=${#1}
Expand All @@ -179,6 +184,7 @@ function center_text()
# -------------------------------------------------------------------------------- #
# Draw a line on the screen. #
# -------------------------------------------------------------------------------- #

function draw_line()
{
local start=$'\e(0' end=$'\e(B' line='qqqqqqqqqqqqqqqq'
Expand All @@ -195,6 +201,7 @@ function draw_line()
# -------------------------------------------------------------------------------- #
# Give a little status report at the end of the run. #
# -------------------------------------------------------------------------------- #

function give_report
{
local status
Expand All @@ -211,6 +218,7 @@ function give_report
# ---------------------------------------------------------------------------------------- #
# The main function where all of the heavy lifting and script config is done. #
# ---------------------------------------------------------------------------------------- #

function main()
{
if [[ $SUPPORTED_HOOKS =~ $HOOK_NAME ]]; then
Expand All @@ -236,4 +244,3 @@ main "${@}"
# ---------------------------------------------------------------------------------------- #
# This is the end - nothing more to see here. #
# ---------------------------------------------------------------------------------------- #

0 comments on commit 177abb0

Please sign in to comment.