On 09/13/2010 01:53 PM, Amos Kong wrote:
> 
> # patch -p1 < /tmp/usb-audio.patch
> # ./configure
> ...
> ...
> preadv support    yes
> fdatasync         yes
> uuid support      no
> vhost-net support no
> Trace backend     nop
> Trace output file trace-<pid>
> ./configure: 2276: Bad substitution
> 
> 
>> diff --git a/create_config b/create_config
>> index 0098e68..1caa25b 100755
>> --- a/create_config
>> +++ b/create_config
>> @@ -25,7 +25,7 @@ case $line in
>>   CONFIG_AUDIO_DRIVERS=*)
>>      drivers=${line#*=}
>>      echo "#define CONFIG_AUDIO_DRIVERS \\"
>> -    for drv in $drivers; do
>> +    for drv in ${drivers//-/_}; do
>>        echo "    &${drv}_audio_driver,\\"
>>      done
>>      echo ""
>> @@ -39,10 +39,12 @@ case $line in
>>      ;;
>>   CONFIG_*=y) # configuration
>>      name=${line%=*}
>> +    name=${name//-/_}
>>      echo "#define $name 1"
>>      ;;
>>   CONFIG_*=*) # configuration
>>      name=${line%=*}
>> +    name=${name//-/_}
>>      value=${line#*=}
>>      echo "#define $name $value"
>>      ;;

Looks like ${.../...} is a bashism.

One can replace it with:

name=`echo "$name" | tr '-' '_'`

and

for drv in `echo "$drivers" | tr '-' '_'`; do

        -hpa

Reply via email to