makesrctars revision 1.11
11.1Sjtc#! /bin/sh
21.3Smikel#
31.11Sfvdl#	$NetBSD: makesrctars,v 1.11 2000/08/06 13:22:16 fvdl 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.11Sfvdl    \! \( \( -path ./gnu -o -path ./share \) -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.10She    \( \
491.10She	-path 'sys/arch/*/compile/CVS' -o \
501.10She	-name .keep_me -o \
511.10She	! \( -path 'sys/arch/*/compile/*' -prune \) \
521.10She    \) \
531.10She    ! \( \( -type l -o -type d \) \( -name obj -o -name 'obj.*' \) \) \
541.8Sperry	-print | \
551.9Smycroft	sort | pax -w -d -s'|^|usr/src/|' | gzip \
561.6Sperry	> ${DESTDIR}/sets/syssrc.tgz
571.1Sjtc
581.1Sjtcfind share \
591.9Smycroft    \! \( \( -type l -o -type d \) \( -name obj -o -name 'obj.*' \) \) \
601.9Smycroft	-print | \
611.9Smycroft	sort | pax -w -d -s'|^|usr/src/|' | gzip \
621.6Sperry	> ${DESTDIR}/sets/sharesrc.tgz
631.6Sperry
641.7Smycroft(cd ${DESTDIR}/sets
651.7Smycroft cksum -o1 *.tgz > BSDSUM
661.7Smycroft cksum *.tgz > CKSUM
671.7Smycroft cksum -o2 *.tgz > SYSVSUM
681.7Smycroft md5 *.tgz > MD5)
691.6Sperrychmod 444 ${DESTDIR}/sets/*
70