NetBSD/distrib/sets/maketars
1997-02-18 06:03:48 +00:00

51 lines
869 B
Bash
Executable File

#!/bin/sh
#
# $NetBSD: maketars,v 1.3 1997/02/18 06:03:48 mikel 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" ] || {
echo RELEASEDIR must be set
exit 1
}
[ "$dest" ] || {
echo DESTDIR must be set
exit 1
}
set -x
for setname in $lists
do
out=$setname.tar.gz
echo "making $out"
sh $setd/makeflist -arch $arch -setd $setd $setname |
(cd $dest ; pax -w -d) |
gzip -9 > ${tars}/$setname.tar.gz
done