regpkgset revision 1.1
11.1Sagc#! /bin/sh 21.1Sagc# 31.1Sagc# $NetBSD: regpkgset,v 1.1 2003/06/12 20:04:00 agc Exp $ 41.1Sagc# 51.1Sagc# Copyright (c) 2003 Alistair G. Crooks. All rights reserved. 61.1Sagc# 71.1Sagc# Redistribution and use in source and binary forms, with or without 81.1Sagc# modification, are permitted provided that the following conditions 91.1Sagc# are met: 101.1Sagc# 1. Redistributions of source code must retain the above copyright 111.1Sagc# notice, this list of conditions and the following disclaimer. 121.1Sagc# 2. Redistributions in binary form must reproduce the above copyright 131.1Sagc# notice, this list of conditions and the following disclaimer in the 141.1Sagc# documentation and/or other materials provided with the distribution. 151.1Sagc# 3. All advertising materials mentioning features or use of this software 161.1Sagc# must display the following acknowledgement: 171.1Sagc# This product includes software developed by Alistair G. Crooks. 181.1Sagc# for the NetBSD project. 191.1Sagc# 4. The name of the author may not be used to endorse or promote 201.1Sagc# products derived from this software without specific prior written 211.1Sagc# permission. 221.1Sagc# 231.1Sagc# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 241.1Sagc# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 251.1Sagc# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 261.1Sagc# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 271.1Sagc# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 281.1Sagc# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 291.1Sagc# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 301.1Sagc# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 311.1Sagc# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 321.1Sagc# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 331.1Sagc# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 341.1Sagc# 351.1Sagc 361.1Sagc# Usage: regpkgset set 371.1Sagc 381.1Sagcverbose="" 391.1Sagc 401.1Sagcwhile [ $# -gt 1 ]; do 411.1Sagc case $1 in 421.1Sagc -v) verbose=$1 ;; 431.1Sagc *) break ;; 441.1Sagc esac 451.1Sagc shift 461.1Sagcdone 471.1Sagc 481.1Sagcif [ $# -lt 1 ]; then 491.1Sagc echo "Usage: regpkgset pkgset..." 501.1Sagc exit 1 511.1Sagcfi 521.1Sagc 531.1Sagccase $1 in 541.1Sagcall) list="base comp etc games man misc text" ;; 551.1Sagc*) list=$@ ;; 561.1Sagcesac 571.1Sagc 581.1Sagcfor pkgset in $list; do 591.1Sagc for pkg in `./listpkgs $pkgset`; do 601.1Sagc ./regpkg $verbose $pkgset $pkg 611.1Sagc done 621.1Sagcdone 631.1Sagc 641.1Sagcexit 0 65