85 lines
1.9 KiB
Bash
Executable File
85 lines
1.9 KiB
Bash
Executable File
#! /bin/sh
|
|
#
|
|
# $NetBSD: makesrctars,v 1.10 1998/11/07 16:59:13 he Exp $
|
|
#
|
|
# Make source code tarballs.
|
|
|
|
GZIP=--best
|
|
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."
|
|
exit 1
|
|
fi
|
|
|
|
cd $SRCDIR
|
|
|
|
mkdir ${DESTDIR}
|
|
|
|
mkdir ${DESTDIR}/sets
|
|
|
|
find . \
|
|
\! \( \( -path ./gnu -o -path ./share -o -path ./domestic \) -prune \) \
|
|
\! \( -path ./sys -prune \) \
|
|
\! \( -path ./usr.sbin/config -prune \) \
|
|
\! \( -path ./usr.sbin/dbsym -prune \) \
|
|
\! \( \( -type l -o -type d \) \( -name obj -o -name 'obj.*' \) \) \
|
|
-print | \
|
|
sort | pax -w -d -s'|^\.|usr/src|' | gzip \
|
|
> ${DESTDIR}/sets/src.tgz
|
|
|
|
find gnu \
|
|
\! \( \( -type l -o -type d \) \( -name obj -o -name 'obj.*' \) \) \
|
|
-print | \
|
|
sort | pax -w -d -s'|^|usr/src/|' | gzip \
|
|
> ${DESTDIR}/sets/gnusrc.tgz
|
|
|
|
find sys usr.sbin/config usr.sbin/dbsym \
|
|
\( \
|
|
-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.*' \) \) \
|
|
-print | \
|
|
sort | pax -w -d -s'|^|usr/src/|' | gzip \
|
|
> ${DESTDIR}/sets/syssrc.tgz
|
|
|
|
find share \
|
|
\! \( \( -type l -o -type d \) \( -name obj -o -name 'obj.*' \) \) \
|
|
-print | \
|
|
sort | pax -w -d -s'|^|usr/src/|' | gzip \
|
|
> ${DESTDIR}/sets/sharesrc.tgz
|
|
|
|
(cd ${DESTDIR}/sets
|
|
cksum -o1 *.tgz > BSDSUM
|
|
cksum *.tgz > CKSUM
|
|
cksum -o2 *.tgz > SYSVSUM
|
|
md5 *.tgz > MD5)
|
|
chmod 444 ${DESTDIR}/sets/*
|
|
|
|
mkdir ${DESTDIR}/security
|
|
|
|
find domestic \
|
|
\! \( \( -type l -o -type d \) \( -name obj -o -name 'obj.*' \) \) \
|
|
-print | \
|
|
sort | pax -w -d -s'|^|usr/src/|' | gzip \
|
|
> ${DESTDIR}/security/secrsrc.tgz
|
|
|
|
(cd ${DESTDIR}/security
|
|
cksum -o1 *.tgz > BSDSUM
|
|
cksum *.tgz > CKSUM
|
|
cksum -o2 *.tgz > SYSVSUM
|
|
md5 *.tgz > MD5)
|
|
chmod 444 ${DESTDIR}/security/*
|