Changeset 1303 for trunk/packages


Ignore:
Timestamp:
Oct 25, 2008, 9:11:40 PM (16 years ago)
Author:
price
Message:

fix gen-files.sh to degrade gracefully to plain-old sh

Location:
trunk/packages/sipb-xen-base
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-base/debian/changelog

    r1252 r1303  
     1sipb-xen-base (8.29) unstable; urgency=low
     2
     3  * gen-files.sh: degrade gracefully to plain-old sh
     4
     5 -- Greg Price <price@mit.edu>  Sat, 25 Oct 2008 20:06:54 -0400
     6
    17sipb-xen-base (8.28) unstable; urgency=low
    28
  • trunk/packages/sipb-xen-base/files/lib/init/gen-files.sh

    r1211 r1303  
    11# Generates files from templates.
    22# Files should be named in an array variable GEN_FILES.
     3# If BASH_VERSION is null or unset, accepts only one file.
    34
    4 gen_files()
    5 {
    6   for f in "${GEN_FILES[@]}"; do
    7     mako-render $f.mako >$f
    8   done
    9 }
     5if [ $BASH_VERSION ]; then
     6  gen_files()
     7  {
     8    for f in "${GEN_FILES[@]}"; do
     9      mako-render "$f".mako >"$f"
     10    done
     11  }
     12else
     13  gen_files()
     14  {
     15    mako-render "$GEN_FILES".mako >"$GEN_FILES"
     16  }
     17fi
Note: See TracChangeset for help on using the changeset viewer.