makesrctars revision 1.9
11.1Sjtc#! /bin/sh
21.3Smikel#
31.9Smycroft#	$NetBSD: makesrctars,v 1.9 1998/10/28 11:02:37 mycroft Exp $
41.3Smikel#
51.3Smikel# Make source code tarballs.
61.1Sjtc
71.1SjtcGZIP=--best
81.1Sjtcexport GZIP
91.1Sjtc
101.1Sjtcif [ -z "$SRCDIR" ]; then
111.1Sjtc	echo SRCDIR must be set
121.1Sjtc	exit 1
131.1Sjtcfi
141.1Sjtc
151.1Sjtcif [ -z "$DESTDIR" ]; then
161.1Sjtc	echo DESTDIR must be set
171.1Sjtc	exit 1
181.1Sjtcfi
191.1Sjtc
201.1Sjtcif [ -d ${DESTDIR} ]; then
211.1Sjtc	echo "DESTDIR exists."
221.1Sjtc	exit 1
231.1Sjtcfi
241.1Sjtc
251.1Sjtccd $SRCDIR
261.1Sjtc
271.1Sjtcmkdir ${DESTDIR}
281.1Sjtc
291.6Sperrymkdir ${DESTDIR}/sets
301.6Sperry
311.1Sjtcfind . \
321.1Sjtc    \! \( \( -path ./gnu -o -path ./share -o -path ./domestic \) -prune \) \
331.1Sjtc    \! \( -path ./sys -prune \) \
341.1Sjtc    \! \( -path ./usr.sbin/config -prune \) \
351.1Sjtc    \! \( -path ./usr.sbin/dbsym -prune \) \
361.9Smycroft    \! \( \( -type l -o -type d \) \( -name obj -o -name 'obj.*' \) \) \
371.9Smycroft	-print | \
381.9Smycroft	sort | pax -w -d -s'|^\.|usr/src|' | gzip \
391.6Sperry	> ${DESTDIR}/sets/src.tgz
401.1Sjtc
411.1Sjtcfind gnu \
421.9Smycroft    \! \( \( -type l -o -type d \) \( -name obj -o -name 'obj.*' \) \) \
431.9Smycroft	-print | \
441.9Smycroft	sort | pax -w -d -s'|^|usr/src/|' | gzip \
451.6Sperry	> ${DESTDIR}/sets/gnusrc.tgz
461.1Sjtc
471.4Smikelfind sys usr.sbin/config usr.sbin/dbsym \
481.9Smycroft    \! \( -path 'sys/arch/*/compile/*' \! -path 'sys/arch/*/compile/CVS' -prune \) \
491.9Smycroft    \! \( \( -type l -o -type d \) \( -name obj -o -name 'obj.*' \) \) \
501.8Sperry	-print | \
511.9Smycroft	sort | pax -w -d -s'|^|usr/src/|' | gzip \
521.6Sperry	> ${DESTDIR}/sets/syssrc.tgz
531.1Sjtc
541.1Sjtcfind share \
551.9Smycroft    \! \( \( -type l -o -type d \) \( -name obj -o -name 'obj.*' \) \) \
561.9Smycroft	-print | \
571.9Smycroft	sort | pax -w -d -s'|^|usr/src/|' | gzip \
581.6Sperry	> ${DESTDIR}/sets/sharesrc.tgz
591.6Sperry
601.7Smycroft(cd ${DESTDIR}/sets
611.7Smycroft cksum -o1 *.tgz > BSDSUM
621.7Smycroft cksum *.tgz > CKSUM
631.7Smycroft cksum -o2 *.tgz > SYSVSUM
641.7Smycroft md5 *.tgz > MD5)
651.6Sperrychmod 444 ${DESTDIR}/sets/*
661.6Sperry
671.6Sperrymkdir ${DESTDIR}/security
681.1Sjtc
691.1Sjtcfind domestic \
701.9Smycroft    \! \( \( -type l -o -type d \) \( -name obj -o -name 'obj.*' \) \) \
711.9Smycroft	-print | \
721.9Smycroft	sort | pax -w -d -s'|^|usr/src/|' | gzip \
731.6Sperry	> ${DESTDIR}/security/secrsrc.tgz
741.6Sperry
751.7Smycroft(cd ${DESTDIR}/security
761.7Smycroft cksum -o1 *.tgz > BSDSUM
771.7Smycroft cksum *.tgz > CKSUM
781.7Smycroft cksum -o2 *.tgz > SYSVSUM
791.7Smycroft md5 *.tgz > MD5)
801.6Sperrychmod 444 ${DESTDIR}/security/*
81