@@ -16,15 +16,15 @@ update_sources() {
1616 }
1717
1818 update_source () {
19- local iLength sConfig sPath sProject sSourceFile sSourcePath sTargetFile sTargetPath
19+ local iLength sConfig sFilePath sPath sProject sSource sSourceFile sSourcePath sTargetFile sTargetPath
2020
2121 readonly sProject=" ${1?Five parameters required: <project> <target-path> <source-path> <path> <config>} "
2222 readonly sTargetPath=" ${2?Five parameters required: <project> <target-path> <source-path> <path> <config>} "
2323 readonly sSourcePath=" ${3?Five parameters required: <project> <target-path> <source-path> <path> <config>} "
2424 readonly sPath=" ${4?Five parameters required: <project> <target-path> <source-path> <path> <config>} "
2525 readonly sConfig=" ${5?Five parameters required: <project> <target-path> <source-path> <path> <config>} "
2626
27- echo -e " \n =====> Updating ${sProject} (${sPath} )"
27+ echo -e " \n =====> Updating ${sProject} (${sPath} )"
2828
2929 if [[ ! -d " ${sSourcePath} /${sPath} " ]]; then
3030 echo ' -----> Creating git clone'
@@ -34,13 +34,12 @@ echo -e "\n =====> Updating ${sProject} (${sPath})"
3434 git --git-dir=" ${sSourcePath} /${sPath} /.git" --work-tree=" ${sSourcePath} /${sPath} " pull
3535 fi
3636
37-
3837 echo ' -----> Looking up config'
3938
4039 sSource=" $( echo " ${sConfig} " | grep " \b${sPath} \b" | tr -d ' ' ) " || true
4140
4241 if [[ " ${sSource} " == ' ' ]]; then
43- echo -e " \tNo config vailable . Skipping"
42+ echo -e " \tNo config available . Skipping"
4443 else
4544 readonly iLength=$(( "${# sSourcePath} + ${# sSource} " + 1 ))
4645 echo ' -----> Copying "*.puml" files'
@@ -50,11 +49,11 @@ echo -e "\n =====> Updating ${sProject} (${sPath})"
5049 sSourceFile=" ${sSourcePath} /${sSource}${sFilePath: ${iLength} } "
5150 sTargetFile=" ${sTargetPath} /${sPath} /${sFilePath: ${iLength} } "
5251
53- sTargetFolder=" $( dirname " ${sTargetFile} " ) "
52+ sTargetFolder=" $( dirname " ${sTargetFile} " ) "
5453
55- if [[ ! -d " ${sTargetFolder} " ]]; then
56- mkdir -p " ${sTargetFolder} "
57- fi
54+ if [[ ! -d " ${sTargetFolder} " ]]; then
55+ mkdir -p " ${sTargetFolder} "
56+ fi
5857
5958 cp " ${sSourceFile} " " ${sTargetFile} "
6059 done
0 commit comments