makesrctars revision 1.12
11.1Sjtc#! /bin/sh
21.3Smikel#
31.12Swiz#	$NetBSD: makesrctars,v 1.12 2001/12/18 10:19:14 wiz 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.12Swiz#	exit 1
231.1Sjtcfi
241.1Sjtc
251.1Sjtccd $SRCDIR
261.1Sjtc
271.1Sjtcmkdir ${DESTDIR}
281.1Sjtc
291.6Sperrymkdir ${DESTDIR}/sets
301.6Sperry
311.12Swizfind -s . \
321.11Sfvdl    \! \( \( -path ./gnu -o -path ./share \) -prune \) \
331.1Sjtc    \! \( -path ./sys -prune \) \
341.1Sjtc    \! \( -path ./usr.sbin/config -prune \) \
351.9Smycroft    \! \( \( -type l -o -type d \) \( -name obj -o -name 'obj.*' \) \) \
361.9Smycroft	-print | \
371.12Swiz	pax -w -d -s'|^\.|usr/src|' | gzip \
381.6Sperry	> ${DESTDIR}/sets/src.tgz
391.1Sjtc
401.12Swizfind -s gnu \
411.9Smycroft    \! \( \( -type l -o -type d \) \( -name obj -o -name 'obj.*' \) \) \
421.9Smycroft	-print | \
431.12Swiz	pax -w -d -s'|^|usr/src/|' | gzip \
441.6Sperry	> ${DESTDIR}/sets/gnusrc.tgz
451.1Sjtc
461.12Swizfind -s sys usr.sbin/config \
471.10She    \( \
481.10She	-path 'sys/arch/*/compile/CVS' -o \
491.10She	-name .keep_me -o \
501.10She	! \( -path 'sys/arch/*/compile/*' -prune \) \
511.10She    \) \
521.10She    ! \( \( -type l -o -type d \) \( -name obj -o -name 'obj.*' \) \) \
531.8Sperry	-print | \
541.12Swiz	pax -w -d -s'|^|usr/src/|' | gzip \
551.6Sperry	> ${DESTDIR}/sets/syssrc.tgz
561.1Sjtc
571.12Swizfind -s share \
581.9Smycroft    \! \( \( -type l -o -type d \) \( -name obj -o -name 'obj.*' \) \) \
591.9Smycroft	-print | \
601.12Swiz	pax -w -d -s'|^|usr/src/|' | gzip \
611.6Sperry	> ${DESTDIR}/sets/sharesrc.tgz
621.6Sperry
631.7Smycroft(cd ${DESTDIR}/sets
641.7Smycroft cksum -o1 *.tgz > BSDSUM
651.7Smycroft cksum *.tgz > CKSUM
661.7Smycroft cksum -o2 *.tgz > SYSVSUM
671.7Smycroft md5 *.tgz > MD5)
681.6Sperrychmod 444 ${DESTDIR}/sets/*
69