Home | History | Annotate | Line # | Download | only in sets
makesrctars revision 1.9
      1 #! /bin/sh
      2 #
      3 #	$NetBSD: makesrctars,v 1.9 1998/10/28 11:02:37 mycroft Exp $
      4 #
      5 # Make source code tarballs.
      6 
      7 GZIP=--best
      8 export GZIP
      9 
     10 if [ -z "$SRCDIR" ]; then
     11 	echo SRCDIR must be set
     12 	exit 1
     13 fi
     14 
     15 if [ -z "$DESTDIR" ]; then
     16 	echo DESTDIR must be set
     17 	exit 1
     18 fi
     19 
     20 if [ -d ${DESTDIR} ]; then
     21 	echo "DESTDIR exists."
     22 	exit 1
     23 fi
     24 
     25 cd $SRCDIR
     26 
     27 mkdir ${DESTDIR}
     28 
     29 mkdir ${DESTDIR}/sets
     30 
     31 find . \
     32     \! \( \( -path ./gnu -o -path ./share -o -path ./domestic \) -prune \) \
     33     \! \( -path ./sys -prune \) \
     34     \! \( -path ./usr.sbin/config -prune \) \
     35     \! \( -path ./usr.sbin/dbsym -prune \) \
     36     \! \( \( -type l -o -type d \) \( -name obj -o -name 'obj.*' \) \) \
     37 	-print | \
     38 	sort | pax -w -d -s'|^\.|usr/src|' | gzip \
     39 	> ${DESTDIR}/sets/src.tgz
     40 
     41 find gnu \
     42     \! \( \( -type l -o -type d \) \( -name obj -o -name 'obj.*' \) \) \
     43 	-print | \
     44 	sort | pax -w -d -s'|^|usr/src/|' | gzip \
     45 	> ${DESTDIR}/sets/gnusrc.tgz
     46 
     47 find sys usr.sbin/config usr.sbin/dbsym \
     48     \! \( -path 'sys/arch/*/compile/*' \! -path 'sys/arch/*/compile/CVS' -prune \) \
     49     \! \( \( -type l -o -type d \) \( -name obj -o -name 'obj.*' \) \) \
     50 	-print | \
     51 	sort | pax -w -d -s'|^|usr/src/|' | gzip \
     52 	> ${DESTDIR}/sets/syssrc.tgz
     53 
     54 find share \
     55     \! \( \( -type l -o -type d \) \( -name obj -o -name 'obj.*' \) \) \
     56 	-print | \
     57 	sort | pax -w -d -s'|^|usr/src/|' | gzip \
     58 	> ${DESTDIR}/sets/sharesrc.tgz
     59 
     60 (cd ${DESTDIR}/sets
     61  cksum -o1 *.tgz > BSDSUM
     62  cksum *.tgz > CKSUM
     63  cksum -o2 *.tgz > SYSVSUM
     64  md5 *.tgz > MD5)
     65 chmod 444 ${DESTDIR}/sets/*
     66 
     67 mkdir ${DESTDIR}/security
     68 
     69 find domestic \
     70     \! \( \( -type l -o -type d \) \( -name obj -o -name 'obj.*' \) \) \
     71 	-print | \
     72 	sort | pax -w -d -s'|^|usr/src/|' | gzip \
     73 	> ${DESTDIR}/security/secrsrc.tgz
     74 
     75 (cd ${DESTDIR}/security
     76  cksum -o1 *.tgz > BSDSUM
     77  cksum *.tgz > CKSUM
     78  cksum -o2 *.tgz > SYSVSUM
     79  md5 *.tgz > MD5)
     80 chmod 444 ${DESTDIR}/security/*
     81