summaryrefslogtreecommitdiffstats
path: root/usr/sbin/pc-sysinstall/backend-query/list-components.sh
diff options
context:
space:
mode:
Diffstat (limited to 'usr/sbin/pc-sysinstall/backend-query/list-components.sh')
-rwxr-xr-xusr/sbin/pc-sysinstall/backend-query/list-components.sh39
1 files changed, 20 insertions, 19 deletions
diff --git a/usr/sbin/pc-sysinstall/backend-query/list-components.sh b/usr/sbin/pc-sysinstall/backend-query/list-components.sh
index 299ce28..e55233e 100755
--- a/usr/sbin/pc-sysinstall/backend-query/list-components.sh
+++ b/usr/sbin/pc-sysinstall/backend-query/list-components.sh
@@ -23,7 +23,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# $FreeBSD: src/usr.sbin/pc-sysinstall/backend-query/list-components.sh,v 1.2 2010/06/27 16:46:11 imp Exp $
+# $FreeBSD: src/usr.sbin/pc-sysinstall/backend-query/list-components.sh,v 1.3 2010/10/21 17:23:48 imp Exp $
# Script which lists the available components for this release
###########################################################################
@@ -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
OpenPOWER on IntegriCloud