# Generates files from templates.
# Files should be named in an array variable GEN_FILES.
+# If BASH_VERSION is null or unset, accepts only one file.
-gen_files()
-{
- for f in "${GEN_FILES[@]}"; do
- mako-render $f.mako >$f
- done
-}
+if [ $BASH_VERSION ]; then
+ gen_files()
+ {
+ for f in "${GEN_FILES[@]}"; do
+ invirt-mako-render "$f".mako >"$f"
+ done
+ }
+else
+ gen_files()
+ {
+ invirt-mako-render "$GEN_FILES".mako >"$GEN_FILES"
+ }
+fi