Re: CVS commit: src/distrib/sets/lists

2009-12-05 Thread Adam Hamsik

On Dec,Saturday 5 2009, at 5:48 AM, Soren Jacobsen wrote:

 Module Name:  src
 Committed By: snj
 Date: Sat Dec  5 04:48:21 UTC 2009
 
 Modified Files:
   src/distrib/sets/lists/base: shl.elf shl.mi
   src/distrib/sets/lists/comp: mi shl.mi
 
 Log Message:
 Update for librumpdev_dm (hi haad!).

Thanks!

Regards

Adam.



Re: CVS commit: src/distrib/sets

2009-12-05 Thread Masao Uebayashi
 @@ -32,15 +32,16 @@
  while getopts L:bxXloa:m:s: ch; do
   case ${ch} in
   L)
 - lists=$(
 - for _list in $( echo ${OPTARG} | tr , ' ' ); do
 - case $_list in
 - base)   echo ${nlists} ;;
 - x)  echo ${xlists} ;;
 - ext)echo ${extlists} ;;
 - esac
 - done
 - )
 + save_IFS=${IFS}
 + IFS=,
 + for _list in ${OPTARG}; do
 + case $_list in
 + base)   lists=${lists} ${nlists} ;;
 + x)  lists=${lists} ${xlists} ;;
 + ext)lists=${lists} ${extlists} ;;
 + esac
 + done
 + IFS=${save_IFS}
   ;;
   # backward compat
   b)

Thanks, this looks better.

Could you elaborate how the old version failed on Mac OS X?

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/distrib/sets

2009-12-05 Thread David Laight
On Sun, Dec 06, 2009 at 01:06:24AM +0900, Masao Uebayashi wrote:

 Could you elaborate how the old version failed on Mac OS X?

lists=$(
for _list in $( echo ${OPTARG} | tr , ' ' ); do
case $_list in
base)   echo ${nlists} ;;
x)  echo ${xlists} ;;
ext)echo ${extlists} ;;
esac
done
)

My guess is that the parser has terminated the first '$(' on the
case label 'base)' while trying to skip the unwanted case clause.

Quite possibly it would all work if the $(...) were replaced by `...`
(the nested one just needs a couple of \).

However since the 'for' doesn't ever generate a subshell there
is no need for the complication.

David

-- 
David Laight: da...@l8s.co.uk