1
0
Files
angie-conv-image/scripts/j2cfg-dirs
Konstantin Demin 612532576b treewide: improve template expansion
also: support *.toml as extra configuration dictionaries
2025-06-19 06:00:31 +03:00

21 lines
347 B
Bash
Executable File

#!/bin/sh
set -ef
__template_list=$(mktemp)
find "$@" -follow -name '*.j2' -type f -printf '%p\0' \
| sort -zuV > "${__template_list}"
[ -s "${__template_list}" ] || {
rm -f "${__template_list}"
exit
}
set +e ; __ret=0
xargs -0r -n 1000 -a "${__template_list}" \
j2cfg-multi < /dev/null || __ret=1
rm -f "${__template_list}"
exit ${__ret}