Date: Thu, 21 Oct 2010 17:23:48 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r214141 - head/usr.sbin/pc-sysinstall/backend-query Message-ID: <201010211723.o9LHNmNE097807@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Thu Oct 21 17:23:48 2010 New Revision: 214141 URL: http://svn.freebsd.org/changeset/base/214141 Log: This patch will only list components if the directory exists. The directory exist on PC-BSD but not FreeBSD, so an extra check is made. Submitted by: John Hixson PR: 151461 Modified: head/usr.sbin/pc-sysinstall/backend-query/list-components.sh Modified: head/usr.sbin/pc-sysinstall/backend-query/list-components.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/list-components.sh Thu Oct 21 17:23:09 2010 (r214140) +++ head/usr.sbin/pc-sysinstall/backend-query/list-components.sh Thu Oct 21 17:23:48 2010 (r214141) @@ -32,23 +32,24 @@ echo "Available Components:" -cd ${COMPDIR} -for i in `ls -d *` -do - if [ -e "${i}/component.cfg" -a -e "${i}/install.sh" -a -e "${i}/distfiles" ] - then - NAME="`grep 'name:' ${i}/component.cfg | cut -d ':' -f 2`" - DESC="`grep 'description:' ${i}/component.cfg | cut -d ':' -f 2`" - TYPE="`grep 'type:' ${i}/component.cfg | cut -d ':' -f 2`" - echo " " - echo "name: ${i}" - echo "desc:${DESC}" - echo "type:${TYPE}" - if [ -e "${i}/component.png" ] +if [ -d "${COMPDIR}" ] +then + cd ${COMPDIR} + for i in `ls -d *` + do + if [ -e "${i}/component.cfg" -a -e "${i}/install.sh" -a -e "${i}/distfiles" ] then - echo "icon: ${COMPDIR}/${i}/component.png" + NAME="`grep 'name:' ${i}/component.cfg | cut -d ':' -f 2`" + DESC="`grep 'description:' ${i}/component.cfg | cut -d ':' -f 2`" + TYPE="`grep 'type:' ${i}/component.cfg | cut -d ':' -f 2`" + echo " " + echo "name: ${i}" + echo "desc:${DESC}" + echo "type:${TYPE}" + if [ -e "${i}/component.png" ] + then + echo "icon: ${COMPDIR}/${i}/component.png" + fi fi - fi - -done - + done +fi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010211723.o9LHNmNE097807>