1996-05-20 23:10:28 +04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
1999-02-13 10:59:45 +03:00
|
|
|
# $NetBSD: maketars,v 1.13 1999/02/13 07:59:45 itohy Exp $
|
1996-05-20 23:10:28 +04:00
|
|
|
#
|
|
|
|
# Make release tar files for some or all lists. Usage:
|
1998-06-15 18:45:05 +04:00
|
|
|
# maketars [-b] [-x] [-a arch] [-m machine] [-s setsdir] [-d destdir] \
|
|
|
|
# [-t tardir] [setname ...]
|
1996-05-20 23:10:28 +04:00
|
|
|
#
|
|
|
|
|
|
|
|
# set defaults
|
1999-02-13 10:59:45 +03:00
|
|
|
: ${MAKE=make}
|
|
|
|
machine=${MACHINE:-`printf 'xxx:\n\techo ${MACHINE}' | $MAKE -s -f-`}
|
|
|
|
arch=${MACHINE_ARCH:-`printf 'xxx:\n\techo ${MACHINE_ARCH}' | $MAKE -s -f-`}
|
1996-05-20 23:10:28 +04:00
|
|
|
setd=`pwd`
|
1998-06-15 18:45:05 +04:00
|
|
|
nlists="base comp etc games man misc text"
|
1997-10-28 20:29:45 +03:00
|
|
|
xlists="xbase xcomp xcontrib xfont xserver"
|
1998-06-15 18:45:05 +04:00
|
|
|
lists=$nlists
|
1996-05-20 23:10:28 +04:00
|
|
|
tars=$RELEASEDIR
|
|
|
|
dest=$DESTDIR
|
|
|
|
|
|
|
|
# handle args
|
1998-06-15 18:45:05 +04:00
|
|
|
while : ; do
|
1996-05-20 23:10:28 +04:00
|
|
|
case $1 in
|
1998-06-15 18:45:05 +04:00
|
|
|
-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
|
|
|
|
;;
|
1996-05-20 23:10:28 +04:00
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
1998-06-27 12:27:36 +04:00
|
|
|
if [ -n "$*" ]; then
|
|
|
|
lists="$*"
|
1998-06-15 18:45:05 +04:00
|
|
|
fi
|
1996-05-20 23:10:28 +04:00
|
|
|
|
1998-06-15 18:45:05 +04:00
|
|
|
if [ -z "$tars" ]; then
|
|
|
|
echo \$RELEASEDIR must be set
|
1994-08-29 19:21:02 +04:00
|
|
|
exit 1
|
1998-06-15 18:45:05 +04:00
|
|
|
fi
|
1994-08-29 19:21:02 +04:00
|
|
|
|
1998-06-15 18:45:05 +04:00
|
|
|
if [ -z "$dest" ]; then
|
|
|
|
echo \$DESTDIR must be set
|
1994-08-29 19:21:02 +04:00
|
|
|
exit 1
|
1998-06-15 18:45:05 +04:00
|
|
|
fi
|
1996-05-20 23:10:28 +04:00
|
|
|
|
1998-06-15 18:45:05 +04:00
|
|
|
for setname in $lists; do
|
1998-12-03 21:17:45 +03:00
|
|
|
out=$setname.tgz
|
1996-05-20 23:10:28 +04:00
|
|
|
echo "making $out"
|
1998-06-15 18:45:05 +04:00
|
|
|
sh $setd/makeflist -a $arch -m $machine -s $setd $setname |
|
1996-05-20 23:10:28 +04:00
|
|
|
(cd $dest ; pax -w -d) |
|
1998-12-03 21:17:45 +03:00
|
|
|
gzip -9 > ${tars}/$out
|
1996-05-20 23:10:28 +04:00
|
|
|
done
|