NetBSD/distrib/sets/maketars

86 lines
1.6 KiB
Plaintext
Raw Normal View History

#!/bin/sh
#
# $NetBSD: maketars,v 1.12 1998/12/03 18:17:45 frueauf Exp $
#
# Make release tar files for some or all lists. Usage:
# maketars [-b] [-x] [-a arch] [-m machine] [-s setsdir] [-d destdir] \
# [-t tardir] [setname ...]
#
# set defaults
machine=${MACHINE:-`printf 'xxx:\n\techo ${MACHINE}' | make -s -f-`}
arch=${MACHINE_ARCH:-`printf 'xxx:\n\techo ${MACHINE_ARCH}' | make -s -f-`}
setd=`pwd`
nlists="base comp etc games man misc text"
1997-10-28 20:29:45 +03:00
xlists="xbase xcomp xcontrib xfont xserver"
lists=$nlists
tars=$RELEASEDIR
dest=$DESTDIR
# handle args
while : ; do
case $1 in
-b*)
lists="$xlists $nlists"
;;
-x*)
lists=$xlists
;;
-a*)
arch=$2; shift
;;
-m*)
machine=$2; shift
;;
-s*)
setd=$2; shift
;;
-d*)
dest=$2; shift
;;
-t*)
tars=$2; shift
;;
-*)
cat 1>&2 <<USAGE
Usage: $0 [-b] [-x] [-a arch] [-m machine] [-s setsdir]
[-d dest] [-t tars] [setname ...]
-b make netbsd + x11 lists
-x only make x11 lists
-a arch set arch (e.g, m68k, mips, powerpc) [$arch]
-m machine set machine (e.g, amiga, i386, macppc) [$machine]
-s setsdir directory to find sets [$setd]
-d dest \$DESTDIR [$dest]
-t tars \$RELEASEDIR [$tars]
[setname ...] sets to build [$lists]
USAGE
exit 1
;;
*)
break
;;
esac
shift
done
if [ -n "$*" ]; then
lists="$*"
fi
if [ -z "$tars" ]; then
echo \$RELEASEDIR must be set
1994-08-29 19:21:02 +04:00
exit 1
fi
1994-08-29 19:21:02 +04:00
if [ -z "$dest" ]; then
echo \$DESTDIR must be set
1994-08-29 19:21:02 +04:00
exit 1
fi
for setname in $lists; do
out=$setname.tgz
echo "making $out"
sh $setd/makeflist -a $arch -m $machine -s $setd $setname |
(cd $dest ; pax -w -d) |
gzip -9 > ${tars}/$out
done