Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/sets - change so that the source directory and sets ...
details: https://anonhg.NetBSD.org/src/rev/0f8a437436b5
branches: trunk
changeset: 546965:0f8a437436b5
user: lukem <lukem%NetBSD.org@localhost>
date: Sat May 10 06:07:26 2003 +0000
description:
- change so that the source directory and sets directory are now
command-line arguments, rather than ${SRCDIR} and ${DESTDIR}/sets
- when building syssrc.tgz, only skip subdirs of sys/arch/*/compile
which are not named "CVS"
- improve method that sets are built
- don't bother chmodding results as it makes it difficult to re-run this
diffstat:
distrib/sets/makesrctars | 88 ++++++++++++++++++++++-------------------------
1 files changed, 42 insertions(+), 46 deletions(-)
diffs (117 lines):
diff -r c76e826f8d15 -r 0f8a437436b5 distrib/sets/makesrctars
--- a/distrib/sets/makesrctars Sat May 10 04:11:53 2003 +0000
+++ b/distrib/sets/makesrctars Sat May 10 06:07:26 2003 +0000
@@ -1,71 +1,67 @@
#! /bin/sh
#
-# $NetBSD: makesrctars,v 1.14 2002/04/12 07:08:37 lukem Exp $
+# $NetBSD: makesrctars,v 1.15 2003/05/10 06:07:26 lukem Exp $
#
-# Make source code tarballs.
+# makesrctars srcdir setdir
+# Create source tarballs in setdir from the source under srcdir.
+#
: ${CKSUM=cksum}
GZIP=-9
export GZIP
-if [ -z "$SRCDIR" ]; then
- echo SRCDIR must be set
+if [ $# -ne 2 ]; then
+ echo "Usage: $0 srcdir setdir"
+ exit 1
+fi
+srcdir=$1
+setdir=$2
+
+if [ ! -d "${setdir}" ]; then
+ echo "${setdir} is not a directory"
exit 1
fi
-if [ -z "$DESTDIR" ]; then
- echo DESTDIR must be set
+if ! cd "${srcdir}"; then
+ echo "Can't chdir to ${srcdir}"
exit 1
fi
-if [ -d ${DESTDIR} ]; then
- echo "DESTDIR exists."
-# exit 1
-fi
-cd $SRCDIR
-
-mkdir ${DESTDIR}
-
-mkdir ${DESTDIR}/sets
-
-find -s . \
- \! \( \( -path ./gnu -o -path ./share \) -prune \) \
- \! \( -path ./sys -prune \) \
- \! \( -path ./usr.sbin/config -prune \) \
- \! \( \( -type l -o -type d \) \( -name obj -o -name 'obj.*' \) \) \
- -print | \
- pax -w -d -s'|^\.|usr/src|' | gzip \
- > ${DESTDIR}/sets/src.tgz
+makeset()
+{
+ set=$1.tgz
+ shift
+ echo "Creating ${set}"
+ set -f
+ find -s $* \
+ ! \( \( -name obj -o -name 'obj.*' \) \( -type l -o -type d \) \) \
+ -print \
+ | pax -w -d -s'|^\.|usr/src|' \
+ | gzip \
+ > "${setdir}/${set}"
+ set +f
+}
-find -s gnu \
- \! \( \( -type l -o -type d \) \( -name obj -o -name 'obj.*' \) \) \
- -print | \
- pax -w -d -s'|^|usr/src/|' | gzip \
- > ${DESTDIR}/sets/gnusrc.tgz
+
+makeset src . \
+ ! \( \( -path ./gnu -o -path ./share \) -prune \) \
+ ! \( -path ./sys -prune \) \
+ ! \( -path ./usr.sbin/config -prune \)
+
+makeset gnusrc ./gnu
-find -s sys usr.sbin/config \
- \( \
- -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 | \
- pax -w -d -s'|^|usr/src/|' | gzip \
- > ${DESTDIR}/sets/syssrc.tgz
+makeset syssrc ./sys ./usr.sbin/config \
+ ! \( -path ./sys/arch/\*/compile/\* -type d \
+ ! -name CVS -prune \)
-find -s share \
- \! \( \( -type l -o -type d \) \( -name obj -o -name 'obj.*' \) \) \
- -print | \
- pax -w -d -s'|^|usr/src/|' | gzip \
- > ${DESTDIR}/sets/sharesrc.tgz
+makeset sharesrc ./share
-(cd ${DESTDIR}/sets
+
+(cd ${setdir}
${CKSUM} -o1 *.tgz > BSDSUM
${CKSUM} *.tgz > CKSUM
${CKSUM} -m *.tgz > MD5
${CKSUM} -o2 *.tgz > SYSVSUM
)
-chmod 444 ${DESTDIR}/sets/*
Home |
Main Index |
Thread Index |
Old Index