# 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.

if [ $BASH_VERSION ]; then
  gen_files()
  {
    for f in "${GEN_FILES[@]}"; do
      mako-render "$f".mako >"$f"
    done
  }
else
  gen_files()
  {
    mako-render "$GEN_FILES".mako >"$GEN_FILES"
  }
fi
