X11rdp: simplify line splitting

Use "IFS=: read" instead of "echo|cut" constructs.
This commit is contained in:
Philipp Hahn 2013-01-25 10:19:56 +01:00
parent 536ac7f9e8
commit eb3253fafc
1 changed files with 2 additions and 7 deletions

View File

@ -90,9 +90,8 @@ remove_modules()
cd build_dir
while read line
while IFS=: read mod_file mod_dir mod_args
do
mod_dir=`echo $line | cut -d':' -f2`
if [ -d $mod_dir ]; then
rm -rf $mod_dir
fi
@ -308,15 +307,11 @@ if [ ! -d cookies ]; then
fi
fi
while read line
while IFS=: read mod_file mod_dir mod_args
do
mod_file=`echo $line | cut -d':' -f1`
mod_dir=`echo $line | cut -d':' -f2`
mod_args=`echo $line | cut -d':' -f3`
mod_args=`eval echo $mod_args`
make_it $mod_file $mod_dir "$mod_args"
done < $data_file
echo "build for X OK"