X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-base.git/blobdiff_plain/f9e6871131e2956644475aefb126059f4e235892..0fbc4842a9e9545cb8f3111e25ece14739507266:/files/lib/init/gen-files.sh diff --git a/files/lib/init/gen-files.sh b/files/lib/init/gen-files.sh index 61d0016..23ff8ad 100644 --- a/files/lib/init/gen-files.sh +++ b/files/lib/init/gen-files.sh @@ -1,9 +1,17 @@ # 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