File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -44,19 +44,24 @@ update_sources() {
4444 readonly iLength=$(( "${# sSourcePath} + ${# sSource} " + 1 ))
4545 echo ' -----> Copying "*.puml" files'
4646
47- find " ${sSourcePath} /${sSource} " -name ' *.puml' -print0 |
48- while read -r -d $' \0' sFilePath; do
49- sSourceFile=" ${sSourcePath} /${sSource}${sFilePath: ${iLength} } "
50- sTargetFile=" ${sTargetPath} /${sPath} /${sFilePath: ${iLength} } "
47+ if [ " $( find " ${sSourcePath} /${sSource} " -name ' *.puml' ) " ]; then
48+ find " ${sSourcePath} /${sSource} " -name ' *.puml' -print0 |
49+ while read -r -d $' \0' sFilePath; do
50+ sSourceFile=" ${sSourcePath} /${sSource}${sFilePath: ${iLength} } "
51+ sTargetFile=" ${sTargetPath} /${sPath} /${sFilePath: ${iLength} } "
5152
5253 sTargetFolder=" $( dirname " ${sTargetFile} " ) "
5354
5455 if [[ ! -d " ${sTargetFolder} " ]]; then
5556 mkdir -p " ${sTargetFolder} "
5657 fi
5758
58- cp " ${sSourceFile} " " ${sTargetFile} "
59- done
59+ cp " ${sSourceFile} " " ${sTargetFile} "
60+ done
61+ else
62+ echo -e " \tNo '*.puml' files found. Skipping"
63+ # @TODO: Check if there is an SVG (or PNG?) source dir and generate '*.puml' files from there
64+ fi
6065 fi
6166 }
6267
You can’t perform that action at this time.
0 commit comments