source: trunk/packages/invirt-base/files/lib/init/gen-files.sh @ 3038

Last change on this file since 3038 was 2977, checked in by gdb, 15 years ago

Added an invirt mako render script.

File size: 370 bytes
RevLine 
[1211]1# Generates files from templates.
2# Files should be named in an array variable GEN_FILES.
[1303]3# If BASH_VERSION is null or unset, accepts only one file.
[1211]4
[1303]5if [ $BASH_VERSION ]; then
6  gen_files()
7  {
8    for f in "${GEN_FILES[@]}"; do
[2977]9      invirt-mako-render "$f".mako >"$f"
[1303]10    done
11  }
12else
13  gen_files()
14  {
[2977]15     invirt-mako-render "$GEN_FILES".mako >"$GEN_FILES"
[1303]16  }
17fi
Note: See TracBrowser for help on using the repository browser.