mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-12-17 09:01:49 +00:00
fix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
f5a8396abe
commit
eba0a32812
30
.pct-helpers
30
.pct-helpers
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user