Skip to content

Commit a7a0170

Browse files
committed
CHANGE: Renames print function names to contain "print" word.
1 parent eb9dca3 commit a7a0170

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

src/git-split-file.sh

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ indent() {
151151
# ==============================================================================
152152

153153
# ==============================================================================
154-
message() {
154+
printMessage() {
155155
# ------------------------------------------------------------------------------
156156
echo -e "# ${*}" >&1
157157
}
@@ -160,7 +160,7 @@ message() {
160160
# ==============================================================================
161161
# Output all given Messages to STDERR
162162
# ------------------------------------------------------------------------------
163-
outputErrorMessages() {
163+
printErrorMessages() {
164164
echo -e "\nErrors occurred:\n\n ${*}" >&2
165165
}
166166
# ==============================================================================
@@ -197,7 +197,7 @@ printRuler() {
197197

198198
sRuler=$(printf -- "${sCharacter}%.0s" {1..40})
199199

200-
message "${sRuler}"
200+
printMessage "${sRuler}"
201201
}
202202
# ==============================================================================
203203

@@ -317,7 +317,7 @@ handleParams() {
317317
# ##############################################################################
318318
# UTILITY FUNCTIONS
319319
# ##############################################################################
320-
debugMessage() {
320+
printDebug() {
321321
if [[ "${DEBUG_LEVEL}" -gt 0 && "${DEBUG_LEVEL}" -lt 5 ]];then
322322
debug "${1}"
323323
fi
@@ -524,26 +524,26 @@ runCleanup() {
524524
printRuler 2
525525
}
526526

527-
outputHeader() {
528-
529-
message " running $0"
530-
message " for source file ${g_sSourceFilePath}"
531-
message " with source directory ${g_sSplitDirectory}"
532-
message " to target directory ${g_sTargetDirectory}"
533-
message " using split strategy ${g_sStrategy}"
534-
535-
debugMessage "g_sRootBranch = ${g_sRootBranch}"
536-
debugMessage "g_sSourceBranch = ${g_sSourceBranch}"
537-
debugMessage "g_sSourceFilePath = ${g_sSourceFilePath}"
538-
debugMessage "g_sSourceFileName = ${g_sSourceFileName}"
539-
debugMessage "g_sSplitDirectory = ${g_sSplitDirectory}"
540-
debugMessage "g_sTargetDirectory = ${g_sTargetDirectory}"
541-
debugMessage "g_sStrategy = ${g_sStrategy}"
527+
printHeader() {
528+
529+
printMessage " running $0"
530+
printMessage " for source file ${g_sSourceFilePath}"
531+
printMessage " with source directory ${g_sSplitDirectory}"
532+
printMessage " to target directory ${g_sTargetDirectory}"
533+
printMessage " using split strategy ${g_sStrategy}"
534+
535+
printDebug "g_sRootBranch = ${g_sRootBranch}"
536+
printDebug "g_sSourceBranch = ${g_sSourceBranch}"
537+
printDebug "g_sSourceFilePath = ${g_sSourceFilePath}"
538+
printDebug "g_sSourceFileName = ${g_sSourceFileName}"
539+
printDebug "g_sSplitDirectory = ${g_sSplitDirectory}"
540+
printDebug "g_sTargetDirectory = ${g_sTargetDirectory}"
541+
printDebug "g_sStrategy = ${g_sStrategy}"
542542
}
543543

544544
run() {
545545

546-
outputHeader
546+
printHeader
547547

548548
if [[ "${DEBUG_LEVEL}" -gt 0 ]];then
549549
printStatus "Debugging on - Debug Level : ${DEBUG_LEVEL}"
@@ -574,26 +574,26 @@ run() {
574574
checkoutRootBranch
575575
git merge --no-ff --no-edit "${g_sSourceBranch}" | indent
576576
else
577-
message 'Aborting.'
577+
printMessage 'Aborting.'
578578
fi
579579
}
580580

581581
finish() {
582582
if [[ ! ${g_iExitCode} -eq 0 ]];then
583583

584-
outputErrorMessages "${g_aErrorMessages[*]}"
584+
printErrorMessages "${g_aErrorMessages[*]}"
585585

586586
if [[ ${g_iExitCode} -eq 65 ]];then
587587
shortUsage "${@}"
588588
fi
589589
fi
590590

591-
debugMessage "Working Directory : $(pwd)"
591+
printDebug "Working Directory : $(pwd)"
592592
if [[ ${g_bInsideGitRepo} = true ]];then
593-
debugMessage "Root branch : $g_sRootBranch"
594-
debugMessage "Current branch : $(getCurrentBranch)"
593+
printDebug "Root branch : $g_sRootBranch"
594+
printDebug "Current branch : $(getCurrentBranch)"
595595
else
596-
debugMessage "Not in a git repo"
596+
printDebug "Not in a git repo"
597597
fi
598598

599599
if [[ ${g_bInsideGitRepo} = true && "${g_sRootBranch}" != "$(getCurrentBranch)" ]];then
@@ -602,7 +602,7 @@ finish() {
602602

603603
runCleanup
604604

605-
message 'Done.'
605+
printMessage 'Done.'
606606

607607
exit ${g_iExitCode}
608608
}

0 commit comments

Comments
 (0)