Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2024-01-20 21:46:21 +03:00
parent f5a8396abe
commit eba0a32812

View File

@ -551,10 +551,6 @@ buildAssets(){
local assets_dir=${ASSETS_DIR:-assets} local assets_dir=${ASSETS_DIR:-assets}
local staging_dir=${STAGING_DIR:-staging} local staging_dir=${STAGING_DIR:-staging}
if ! [ -e $template_dir ] ; then
return
fi
local PCT_TEMPLATE_PATTERNS=($(makePCTTemplateSEDPatterns "$@")) local PCT_TEMPLATE_PATTERNS=($(makePCTTemplateSEDPatterns "$@"))
# assets... # assets...
@ -564,18 +560,20 @@ buildAssets(){
fi fi
# template dir... # template dir...
local TEMPLATES=($(find "$template_dir" -type f)) if [ -e $template_dir ] ; then
for file in "${TEMPLATES[@]}" ; do local TEMPLATES=($(find "$template_dir" -type f))
file=${file#${template_dir}} for file in "${TEMPLATES[@]}" ; do
echo Generating: ${file}... file=${file#${template_dir}}
[ $DRY_RUN ] \ echo Generating: ${file}...
&& continue [ $DRY_RUN ] \
# ensure the directory exists... && continue
mkdir -p "$(dirname "${staging_dir}/${file}")" # ensure the directory exists...
cat "${template_dir}/${file}" \ mkdir -p "$(dirname "${staging_dir}/${file}")"
| expandTemplate \ cat "${template_dir}/${file}" \
> "${staging_dir}/${file}" | expandTemplate \
done > "${staging_dir}/${file}"
done
fi
# special case: NOTES.md... # special case: NOTES.md...
if [ -z "$DESCRIPTION" ] && [ -e "$NOTES" ] ; then if [ -z "$DESCRIPTION" ] && [ -e "$NOTES" ] ; then