51 lines
864 B
Bash
Executable File
51 lines
864 B
Bash
Executable File
#!/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" ] || {
|
|
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"
|
|
$setd/makeflist -arch $arch -setd $setd $setname |
|
|
(cd $dest ; pax -w -d) |
|
|
gzip -9 > ${tars}/$setname.tar.gz
|
|
done
|