NetBSD/distrib/sets/maketars

51 lines
864 B
Plaintext
Raw Normal View History

#!/bin/sh
#
# $NetBSD: maketars,v 1.2 1996/05/20 19:11:05 gwr Exp $
#
# Make release tar files for some or all lists. Usage:
# maketars [-arch arch] [-setd setsdir] [-dest destdir] \
# [-tars tardir] [setname ...]
#
# set defaults
arch=`uname -m`
setd=`pwd`
lists="base comp etc games man misc text"
tars=$RELEASEDIR
dest=$DESTDIR
# handle args
while :
do
case $1 in
-arch) arch=$2; shift;;
-setd) setd=$2; shift;;
-dest) dest=$2; shift;;
-tars) tars=$2; shift;;
-*) echo "bad option"; exit 1;;
*) break;;
esac
shift
done
[ "$@" ] && lists="$@"
[ "$tars" ] || {
1994-08-29 19:21:02 +04:00
echo RELEASEDIR must be set
exit 1
}
1994-08-29 19:21:02 +04:00
[ "$dest" ] || {
1994-08-29 19:21:02 +04:00
echo DESTDIR must be set
exit 1
}
set -x
for setname in $lists
do
out=$setname.tar.gz
echo "making $out"
$setd/makeflist -arch $arch -setd $setd $setname |
(cd $dest ; pax -w -d) |
gzip -9 > ${tars}/$setname.tar.gz
done