@@ -49,7 +49,7 @@ EXIT_FAILURE=1
49
49
# Run some basic checks to make sure everything looks right. #
50
50
# ---------------------------------------------------------------------------------------- #
51
51
52
- function run_pre_checks()
52
+ function run_pre_checks
53
53
{
54
54
if [[ ! -d " ${HOOKS_DIR} " ]]; then
55
55
warn " The hook directory ${HOOKS_DIR} doesn't exist - skipping"
@@ -110,6 +110,7 @@ function process_hooks()
110
110
# -------------------------------------------------------------------------------- #
111
111
# Show the user a success message. #
112
112
# -------------------------------------------------------------------------------- #
113
+
113
114
function success()
114
115
{
115
116
local message=" ${1:- } "
@@ -124,6 +125,7 @@ function success()
124
125
# -------------------------------------------------------------------------------- #
125
126
# Show the user a warning message. #
126
127
# -------------------------------------------------------------------------------- #
128
+
127
129
function warn()
128
130
{
129
131
local message=" ${1:- } "
@@ -138,6 +140,7 @@ function warn()
138
140
# -------------------------------------------------------------------------------- #
139
141
# Show the user a failure message. #
140
142
# -------------------------------------------------------------------------------- #
143
+
141
144
function fail()
142
145
{
143
146
local message=" ${1:- } "
@@ -152,6 +155,7 @@ function fail()
152
155
# -------------------------------------------------------------------------------- #
153
156
# Show the user an information message. #
154
157
# -------------------------------------------------------------------------------- #
158
+
155
159
function info()
156
160
{
157
161
local message=" ${1:- } "
@@ -166,6 +170,7 @@ function info()
166
170
# -------------------------------------------------------------------------------- #
167
171
# Center some text on the screen. #
168
172
# -------------------------------------------------------------------------------- #
173
+
169
174
function center_text()
170
175
{
171
176
textsize=${# 1}
@@ -179,6 +184,7 @@ function center_text()
179
184
# -------------------------------------------------------------------------------- #
180
185
# Draw a line on the screen. #
181
186
# -------------------------------------------------------------------------------- #
187
+
182
188
function draw_line()
183
189
{
184
190
local start=$' \e (0' end=$' \e (B' line=' qqqqqqqqqqqqqqqq'
@@ -195,6 +201,7 @@ function draw_line()
195
201
# -------------------------------------------------------------------------------- #
196
202
# Give a little status report at the end of the run. #
197
203
# -------------------------------------------------------------------------------- #
204
+
198
205
function give_report
199
206
{
200
207
local status
@@ -211,6 +218,7 @@ function give_report
211
218
# ---------------------------------------------------------------------------------------- #
212
219
# The main function where all of the heavy lifting and script config is done. #
213
220
# ---------------------------------------------------------------------------------------- #
221
+
214
222
function main()
215
223
{
216
224
if [[ $SUPPORTED_HOOKS =~ $HOOK_NAME ]]; then
@@ -236,4 +244,3 @@ main "${@}"
236
244
# ---------------------------------------------------------------------------------------- #
237
245
# This is the end - nothing more to see here. #
238
246
# ---------------------------------------------------------------------------------------- #
239
-
0 commit comments