21 lines
347 B
Bash
Executable File
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}
|