@@ -258,7 +258,7 @@ fullUsage() {
258
258
# ------------------------------------------------------------------------------
259
259
handleParams () {
260
260
261
- local iDebugLevel sParam sRootFile sSplitDirectory sTargetDirectory
261
+ local iDebugLevel sParam sRootFile sSplitDirectory
262
262
263
263
iDebugLevel=0
264
264
@@ -363,14 +363,14 @@ createSourceBranch() {
363
363
createBranchName () {
364
364
local sFile
365
365
366
- sFile=" $( basename $1 ) "
366
+ sFile=$( basename " ${1} " )
367
367
368
368
echo " ${g_sSourceBranch} _${sFile} "
369
369
}
370
370
371
371
createSplitBranch () {
372
372
printStatus " Creating separate branch to split file '${1} '"
373
- createBranch " $( createBranchName ${1} ) " " ${g_sSourceBranch} "
373
+ createBranch " $( createBranchName " ${1} " ) " " ${g_sSourceBranch} "
374
374
}
375
375
376
376
checkoutBranch () {
@@ -383,7 +383,7 @@ checkoutSplitBranch() {
383
383
384
384
sFile=" ${1} "
385
385
386
- sBranchName=" $( createBranchName ${sFile} ) "
386
+ sBranchName=$( createBranchName " ${sFile} " )
387
387
388
388
checkoutBranch " ${sBranchName} " ' split'
389
389
}
@@ -401,7 +401,7 @@ mergeSplitBranch() {
401
401
local -i iResult=0
402
402
sFile=" ${1} "
403
403
404
- sBranchName=" $( createBranchName ${sFile} ) "
404
+ sBranchName=$( createBranchName " ${sFile} " )
405
405
406
406
printTopic " Merging branch '${sBranchName} ' back into '$( getCurrentBranch) '"
407
407
@@ -485,7 +485,7 @@ splitFiles() {
485
485
local sFile sFileName
486
486
487
487
for sFile in ${g_sSplitDirectory} /* ; do
488
- sFileName=" $( basename ${sFile} ) "
488
+ sFileName=$( basename " ${sFile} " )
489
489
# if [[ "${sFile}" = "${g_sSourceFileName}" ]];then
490
490
# printStatus "Skipping source file '${g_sSourceFileName}'"
491
491
# else
@@ -533,15 +533,15 @@ runCleanup() {
533
533
git branch -D " ${g_sSourceBranch} " | indent
534
534
535
535
for sFile in ${g_sSplitDirectory} /* ; do
536
- sBranchName=" $( createBranchName ${sFile} ) "
536
+ sBranchName=$( createBranchName " ${sFile} " )
537
537
538
538
# shellcheck disable=SC2086
539
539
if [[ -n " $( git show-ref refs/heads/${sBranchName} ) " ]]; then
540
540
# Branch exists
541
541
git branch -D " ${sBranchName} " | indent
542
542
fi
543
543
done
544
- sBranchName=" $( createBranchName ${g_sSourceFileName} ) "
544
+ sBranchName=$( createBranchName " ${g_sSourceFileName} " )
545
545
546
546
# shellcheck disable=SC2086
547
547
if [[ -n " $( git show-ref refs/heads/${sBranchName} ) " ]]; then
0 commit comments