1996-02-13 00:58:46 +03:00
|
|
|
#! /bin/sh
|
1997-02-18 10:06:00 +03:00
|
|
|
#
|
2002-04-12 11:08:37 +04:00
|
|
|
# $NetBSD: makesrctars,v 1.14 2002/04/12 07:08:37 lukem Exp $
|
1997-02-18 10:06:00 +03:00
|
|
|
#
|
|
|
|
# Make source code tarballs.
|
1996-02-13 00:58:46 +03:00
|
|
|
|
2002-04-11 10:04:42 +04:00
|
|
|
: ${CKSUM=cksum}
|
|
|
|
|
2002-04-12 11:08:37 +04:00
|
|
|
GZIP=-9
|
1996-02-13 00:58:46 +03:00
|
|
|
export GZIP
|
|
|
|
|
|
|
|
if [ -z "$SRCDIR" ]; then
|
|
|
|
echo SRCDIR must be set
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z "$DESTDIR" ]; then
|
|
|
|
echo DESTDIR must be set
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -d ${DESTDIR} ]; then
|
|
|
|
echo "DESTDIR exists."
|
2001-12-18 13:19:14 +03:00
|
|
|
# exit 1
|
1996-02-13 00:58:46 +03:00
|
|
|
fi
|
|
|
|
|
|
|
|
cd $SRCDIR
|
|
|
|
|
|
|
|
mkdir ${DESTDIR}
|
|
|
|
|
1997-12-30 02:31:06 +03:00
|
|
|
mkdir ${DESTDIR}/sets
|
|
|
|
|
2001-12-18 13:19:14 +03:00
|
|
|
find -s . \
|
2000-08-06 17:22:16 +04:00
|
|
|
\! \( \( -path ./gnu -o -path ./share \) -prune \) \
|
1996-02-13 00:58:46 +03:00
|
|
|
\! \( -path ./sys -prune \) \
|
|
|
|
\! \( -path ./usr.sbin/config -prune \) \
|
1998-10-28 14:02:37 +03:00
|
|
|
\! \( \( -type l -o -type d \) \( -name obj -o -name 'obj.*' \) \) \
|
|
|
|
-print | \
|
2001-12-18 13:19:14 +03:00
|
|
|
pax -w -d -s'|^\.|usr/src|' | gzip \
|
1997-12-30 02:31:06 +03:00
|
|
|
> ${DESTDIR}/sets/src.tgz
|
1996-02-13 00:58:46 +03:00
|
|
|
|
2001-12-18 13:19:14 +03:00
|
|
|
find -s gnu \
|
1998-10-28 14:02:37 +03:00
|
|
|
\! \( \( -type l -o -type d \) \( -name obj -o -name 'obj.*' \) \) \
|
|
|
|
-print | \
|
2001-12-18 13:19:14 +03:00
|
|
|
pax -w -d -s'|^|usr/src/|' | gzip \
|
1997-12-30 02:31:06 +03:00
|
|
|
> ${DESTDIR}/sets/gnusrc.tgz
|
1996-02-13 00:58:46 +03:00
|
|
|
|
2001-12-18 13:19:14 +03:00
|
|
|
find -s sys usr.sbin/config \
|
1998-11-07 19:59:13 +03:00
|
|
|
\( \
|
|
|
|
-path 'sys/arch/*/compile/CVS' -o \
|
|
|
|
-name .keep_me -o \
|
|
|
|
! \( -path 'sys/arch/*/compile/*' -prune \) \
|
|
|
|
\) \
|
|
|
|
! \( \( -type l -o -type d \) \( -name obj -o -name 'obj.*' \) \) \
|
1998-10-12 20:28:35 +04:00
|
|
|
-print | \
|
2001-12-18 13:19:14 +03:00
|
|
|
pax -w -d -s'|^|usr/src/|' | gzip \
|
1997-12-30 02:31:06 +03:00
|
|
|
> ${DESTDIR}/sets/syssrc.tgz
|
1996-02-13 00:58:46 +03:00
|
|
|
|
2001-12-18 13:19:14 +03:00
|
|
|
find -s share \
|
1998-10-28 14:02:37 +03:00
|
|
|
\! \( \( -type l -o -type d \) \( -name obj -o -name 'obj.*' \) \) \
|
|
|
|
-print | \
|
2001-12-18 13:19:14 +03:00
|
|
|
pax -w -d -s'|^|usr/src/|' | gzip \
|
1997-12-30 02:31:06 +03:00
|
|
|
> ${DESTDIR}/sets/sharesrc.tgz
|
|
|
|
|
1998-05-10 20:48:44 +04:00
|
|
|
(cd ${DESTDIR}/sets
|
2002-04-11 10:04:42 +04:00
|
|
|
${CKSUM} -o1 *.tgz > BSDSUM
|
|
|
|
${CKSUM} *.tgz > CKSUM
|
|
|
|
${CKSUM} -m *.tgz > MD5
|
|
|
|
${CKSUM} -o2 *.tgz > SYSVSUM
|
|
|
|
)
|
1997-12-30 02:31:06 +03:00
|
|
|
chmod 444 ${DESTDIR}/sets/*
|