#!/bin/sh RELEASE=22 SPLITSIZE=240640 GZIP=--best export GZIP if [ -z "$SRCDIR" ]; then echo SRCDIR must be set exit 1 fi if [ -z "$RELEASEDIR" ]; then echo RELEASEDIR must be set exit 1 fi cd $SRCDIR mkdir -p ${RELEASEDIR}/src${RELEASE} find . \ \! \( \( -path ./gnu -o -path ./share \) -prune \) \ \! \( -path ./sys -prune \) \ \! \( -path ./usr.sbin/config -prune \) \ \! \( -path ./usr.sbin/config.old -prune \) \ \! \( -path ./usr.sbin/dbsym -prune \) \ \! \( -name obj -prune \) -print | \ sort | pax -wv -d -s'|^./|./usr/src/|' | gzip -9 | \ split -b ${SPLITSIZE} - ${RELEASEDIR}/src${RELEASE}/src${RELEASE}. (cd ${RELEASEDIR}/src${RELEASE}; cksum src${RELEASE}.* > CKSUM; \ md5 src${RELEASE}.* > MD5) chmod 444 ${RELEASEDIR}/src${RELEASE}/* mkdir ${RELEASEDIR}/gsrc${RELEASE} find gnu \ \! \( -name obj -prune \) -print | \ sort | pax -wv -d -s'|^|./usr/src/|' | gzip -9 | \ split -b ${SPLITSIZE} - ${RELEASEDIR}/gsrc${RELEASE}/gsrc${RELEASE}. (cd ${RELEASEDIR}/gsrc${RELEASE}; cksum gsrc${RELEASE}.* > CKSUM; \ md5 gsrc${RELEASE}.* > MD5) chmod 444 ${RELEASEDIR}/gsrc${RELEASE}/* mkdir ${RELEASEDIR}/ksrc${RELEASE} find sys usr.sbin/config usr.sbin/config.old usr.sbin/dbsym \ \! \( -name obj -prune \) -print | \ sort | pax -wv -d -s'|^|./usr/src/|' | gzip -9 | \ split -b ${SPLITSIZE} - ${RELEASEDIR}/ksrc${RELEASE}/ksrc${RELEASE}. (cd ${RELEASEDIR}/ksrc${RELEASE}; cksum ksrc${RELEASE}.* > CKSUM; \ md5 ksrc${RELEASE}.* > MD5) chmod 444 ${RELEASEDIR}/ksrc${RELEASE}/* mkdir ${RELEASEDIR}/ssrc${RELEASE} find share \ \! \( -name obj -prune \) -print | \ sort | pax -wv -d -s'|^|./usr/src/|' | gzip -9 | \ split -b ${SPLITSIZE} - ${RELEASEDIR}/ssrc${RELEASE}/ssrc${RELEASE}. (cd ${RELEASEDIR}/ssrc${RELEASE}; cksum ssrc${RELEASE}.* > CKSUM; \ md5 ssrc${RELEASE}.* > MD5) chmod 444 ${RELEASEDIR}/ssrc${RELEASE}/*