X11rdp: simplify line splitting

Use "IFS=: read" instead of "echo|cut" constructs.
ulab-next
Philipp Hahn 12 years ago
parent 536ac7f9e8
commit eb3253fafc

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

Loading…
Cancel
Save