summaryrefslogtreecommitdiff
path: root/distrib/sets/makesrctars
blob: 2e11ec000912a34fd81f51625c694328066a636e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/sh

RELEASE=20
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}/*