#! /bin/sh # # $NetBSD: makesrctars,v 1.18 2004/05/09 13:46:00 lukem Exp $ # # makesrctars srcdir setdir # Create source tarballs in setdir from the source under srcdir. # prog=${0##*/} # set defaults : ${CKSUM=cksum} : ${PAX=pax} xsrcdir= GZIP=-9 export GZIP usage() { cat 1>&2 < "${setdir}/${set}" set +f } # create (base)src sets # if ! cd "${srcdir}"; then echo "Can't chdir to ${srcdir}" exit 1 fi srcprefix=usr/src makeset src . \ ! \( \( -path ./gnu \ -o -path ./share \ -o -path ./sys \ -o -path ./contrib/sys \ -o -path ./usr.sbin/config \ \) -prune \) makeset gnusrc ./gnu makeset syssrc ./sys ./contrib/sys ./usr.sbin/config \ ! \( -path ./sys/arch/\*/compile/\* -type d \ ! -name CVS -prune \) makeset sharesrc ./share # create xsrc sets # if [ -n "${xsrcdir}" ]; then if ! cd "${xsrcdir}"; then echo "Can't chdir to ${xsrcdir}" exit 1 fi srcprefix=usr/xsrc makeset xsrc . fi echo "Creating checksum files" (cd ${setdir} ${CKSUM} -o1 *.tgz > BSDSUM ${CKSUM} *.tgz > CKSUM ${CKSUM} -m *.tgz > MD5 ${CKSUM} -o2 *.tgz > SYSVSUM )