From eb3253fafcf157d281e70e0b7c6e4e67ff55507e Mon Sep 17 00:00:00 2001 From: Philipp Hahn Date: Fri, 25 Jan 2013 10:19:56 +0100 Subject: [PATCH] X11rdp: simplify line splitting Use "IFS=: read" instead of "echo|cut" constructs. --- xorg/X11R7.6/buildx.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/xorg/X11R7.6/buildx.sh b/xorg/X11R7.6/buildx.sh index 464dd874..fe2f9ef6 100755 --- a/xorg/X11R7.6/buildx.sh +++ b/xorg/X11R7.6/buildx.sh @@ -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"