|
Last change
on this file since 1312 was
1303,
checked in by price, 17 years ago
|
|
fix gen-files.sh to degrade gracefully to plain-old sh
|
|
File size:
355 bytes
|
| Line | |
|---|
| 1 | # Generates files from templates. |
|---|
| 2 | # Files should be named in an array variable GEN_FILES. |
|---|
| 3 | # If BASH_VERSION is null or unset, accepts only one file. |
|---|
| 4 | |
|---|
| 5 | if [ $BASH_VERSION ]; then |
|---|
| 6 | gen_files() |
|---|
| 7 | { |
|---|
| 8 | for f in "${GEN_FILES[@]}"; do |
|---|
| 9 | mako-render "$f".mako >"$f" |
|---|
| 10 | done |
|---|
| 11 | } |
|---|
| 12 | else |
|---|
| 13 | gen_files() |
|---|
| 14 | { |
|---|
| 15 | mako-render "$GEN_FILES".mako >"$GEN_FILES" |
|---|
| 16 | } |
|---|
| 17 | fi |
|---|
Note: See
TracBrowser
for help on using the repository browser.