summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsdinstall/scripts/auto
diff options
context:
space:
mode:
authordteske <dteske@FreeBSD.org>2012-10-22 18:14:27 +0000
committerdteske <dteske@FreeBSD.org>2012-10-22 18:14:27 +0000
commitb8c74d455d2690e710a0802a98a9d310995a52eb (patch)
treeee23b67fd25b371e96c8c4aa36b1c327a8ea7ab9 /usr.sbin/bsdinstall/scripts/auto
parent83ab66c2117b8b182fe64b93994e6593c63a2c96 (diff)
downloadFreeBSD-src-b8c74d455d2690e710a0802a98a9d310995a52eb.zip
FreeBSD-src-b8c74d455d2690e710a0802a98a9d310995a52eb.tar.gz
Optimize syntax to use builtins and reduce unnecessary forking where possible.
Reviewed by: nwhitehorn Approved by: adrian (co-mentor)
Diffstat (limited to 'usr.sbin/bsdinstall/scripts/auto')
-rwxr-xr-xusr.sbin/bsdinstall/scripts/auto14
1 files changed, 7 insertions, 7 deletions
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
OpenPOWER on IntegriCloud