1#!/bin/sh 2#- 3# Copyright (c) 2010 iXsystems, Inc. All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions 7# are met: 8# 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24# SUCH DAMAGE. 25# |
26# $FreeBSD: head/usr.sbin/pc-sysinstall/backend-query/get-packages.sh 211485 2010-08-19 05:59:27Z imp $ |
27 28# Script which lists the available packages for this release 29########################################################################### 30 31. ${PROGDIR}/backend/functions.sh 32. ${PROGDIR}/backend/functions-packages.sh 33 |
34ID=`id -u` |
35if [ "${ID}" -ne "0" ] 36then 37 echo "Error: must be root!" 38 exit 1 39fi 40 |
41if [ ! -f "${PKGDIR}/INDEX" ] 42then |
43 get_package_index |
44fi 45 46if [ -f "${PKGDIR}/INDEX" ] 47then 48 echo "${PKGDIR}/INDEX" 49 exit 0 50fi 51 52exit 1 |