Home | History | Annotate | Line # | Download | only in sets
maketars revision 1.8
      1 #!/bin/sh
      2 #
      3 # $NetBSD: maketars,v 1.8 1997/11/27 11:05:25 jonathan Exp $
      4 #
      5 # Make release tar files for some or all lists.  Usage:
      6 # maketars [-arch arch] [-setd setsdir] [-dest destdir] \
      7 #	[-tars tardir] [-x11] [setname ...]
      8 #
      9 
     10 # set defaults
     11 arch=${MACHINE:-`uname -m`}
     12 setd=`pwd`
     13 lists="base comp etc games man misc text"
     14 xlists="xbase xcomp xcontrib xfont xserver"
     15 tars=$RELEASEDIR
     16 dest=$DESTDIR
     17 
     18 # handle args
     19 while :
     20 do
     21 	case $1 in
     22 	-arch)	arch=$2; shift;;
     23 	-setd)	setd=$2; shift;;
     24 	-dest)	dest=$2; shift;;
     25 	-tars)	tars=$2; shift;;
     26 	-both)	lists="$xlists $lists";;
     27 	-x11)	lists=$xlists;;
     28 	-*)	echo "bad option"; exit 1;;
     29 	*)	break;;
     30 	esac
     31 	shift
     32 done
     33 [ "$@" ] && lists="$@"
     34 
     35 [ "$tars" ] || {
     36 	echo RELEASEDIR must be set
     37 	exit 1
     38 }
     39 
     40 [ "$dest" ] || {
     41 	echo DESTDIR must be set
     42 	exit 1
     43 }
     44 
     45 set -x
     46 for setname in $lists
     47 do
     48 	out=$setname.tar.gz
     49 	echo "making $out"
     50 	sh $setd/makeflist -arch $arch -setd $setd $setname |
     51 	  (cd $dest ; pax -w -d) |
     52 	  gzip -9 > ${tars}/$setname.tgz
     53 done
     54