Changeset 4014


Ignore:
Timestamp:
2006-06-19T23:45:07+02:00 (12 years ago)
Author:
nbd
Message:

add a list append function to functions.sh

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/buildroot-ng/openwrt/package/base-files/default/etc/functions.sh

    r3844 r4014  
    11#!/bin/sh 
    22alias debug=${DEBUG:-:} 
     3 
     4# newline 
     5N=" 
     6" 
    37 
    48# valid interface? 
     
    1115hotplug_dev() { 
    1216        env -i ACTION=$1 INTERFACE=$2 /sbin/hotplug net 
     17} 
     18 
     19append() { 
     20        local var="$1" 
     21        local value="$2" 
     22        local sep="${3:- }" 
     23        eval "export ${var}=\"\${${var}:+\${${var}}${value:+$sep}}$value\"" 
    1324} 
    1425 
Note: See TracChangeset for help on using the changeset viewer.