Changeset 2418

Show
Ignore:
Timestamp:
04/22/07 23:39:44 (2 years ago)
Author:
dnehring
Message:

Small helper function for appending strings to a variable.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/freewrt/package/base-files/files/etc/functions.sh

    r2375 r2418  
     1# newline 
     2N=" 
     3" 
     4 
     5append() { 
     6        local var="$1" 
     7        local value="$2" 
     8        local sep="${3:- }" 
     9 
     10        eval "export -- \"$var=\${$var:+\${$var}\${value:+\$sep}}\$value\"" 
     11} 
     12 
    113load_modules() { 
    214        sed 's/^[^#]/insmod &/' $* | ash 2>&- || :