From c4dc338aaba9595e5e8e0372b7c2aba233b1ec2b Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Fri, 5 Dec 2008 18:23:21 +0100 Subject: workaround for the weird awk problem --- src/core/libs/lib-ui-interactive.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index 7e4a995..9f8b990 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -408,11 +408,11 @@ interactive_filesystems() { [ "$ANSWER_OPTION" == DONE ] && USERHAPPY=1 && break part=$ANSWER_OPTION - # TODO: Something goes wrong here.. all these 3 become the complete line + declare part_escaped=${part//\//\\/} # the bash substition replaces all /'s with \/'s otherwise awk complains - part_type=` awk "/^$part_escaped/ {print \$2}" $BLOCK_DATA` - part_label=`awk "/^$part_escaped/ {print \$3}" $BLOCK_DATA` - fs=` awk "/^$part_escaped/ {print \$4}" $BLOCK_DATA` + part_type=$( awk "/^$part_escaped/ {print \$2}" $BLOCK_DATA) + part_label=$(awk "/^$part_escaped/ {print \$3}" $BLOCK_DATA) + fs=$( awk "/^$part_escaped/ {print \$4}" $BLOCK_DATA) [ "$part_label" == no_label ] && part_label= [ "$fs" == no_fs ] && fs= -- cgit v1.2.3-54-g00ecf