From b8c74d455d2690e710a0802a98a9d310995a52eb Mon Sep 17 00:00:00 2001 From: dteske Date: Mon, 22 Oct 2012 18:14:27 +0000 Subject: Optimize syntax to use builtins and reduce unnecessary forking where possible. Reviewed by: nwhitehorn Approved by: adrian (co-mentor) --- usr.sbin/bsdinstall/scripts/auto | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'usr.sbin/bsdinstall/scripts/auto') diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto index f6d1d37..356a215 100755 --- a/usr.sbin/bsdinstall/scripts/auto +++ b/usr.sbin/bsdinstall/scripts/auto @@ -53,15 +53,15 @@ bsdinstall hostname || error export DISTRIBUTIONS="base.txz kernel.txz" if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; then - DISTMENU=`cut -f 4,5,6 $BSDINSTALL_DISTDIR/MANIFEST | grep -v -e ^kernel -e ^base` + DISTMENU=`awk '!/^(kernel|base)/{print $4,$5,$6}' $BSDINSTALL_DISTDIR/MANIFEST` exec 3>&1 - EXTRA_DISTS=$(echo $DISTMENU | xargs dialog \ - --backtitle "FreeBSD Installer" \ - --title "Distribution Select" --nocancel --separate-output \ - --checklist "Choose optional system components to install:" \ - 0 0 0 \ - 2>&1 1>&3) + EXTRA_DISTS=$( eval dialog \ + --backtitle \"FreeBSD Installer\" \ + --title \"Distribution Select\" --nocancel --separate-output \ + --checklist \"Choose optional system components to install:\" \ + 0 0 0 $DISTMENU \ + 2>&1 1>&3 ) for dist in $EXTRA_DISTS; do export DISTRIBUTIONS="$DISTRIBUTIONS $dist.txz" done -- cgit v1.1