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
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to