summaryrefslogtreecommitdiff
path: root/distrib/sets/maketars
blob: 3beaa77fbbfbc289299b351c8a66ef8591f8f10a (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
#!/bin/sh
#	$OpenBSD: maketars,v 1.6 2014/08/31 16:52:26 matthieu Exp $

# xy
RELEASE=$1

if [ "X${RELEASE}" = "X" ]; then
	echo "Usage: `basename $0` <OSREVISION>"
	exit 1
fi

if [ "X${RELEASEDIR}" = "X" ]; then
	echo RELEASEDIR must be set
	exit 1
fi

if [ "X${DESTDIR}" = "X" ]; then
	echo DESTDIR must be set
	exit 1
fi

arch=${MACHINE}
pwd=`pwd`
listsdir=`pwd`/lists
tardir=$RELEASEDIR

TMPDIR=`mktemp -d /tmp/_maketarsx.XXXXXXXXXX` || exit 1
trap 'rm -f $TMP1 $TMP2; rmdir $TMPDIR' 0 1 15
TMP1=$TMPDIR/one
TMP2=$TMPDIR/two

cd $DESTDIR

for setname in xbase xfont xserv xshare; do
	echo -n "${setname}: "
	(cd $pwd; sh gensetlist $setname) | sort > $TMP1
	sed -n  '/^\.\/usr\/X11R6\/lib\/lib.*\.so\..*/{p;}' $TMP1 > $TMP2
	sed     '/^\.\/usr\/X11R6\/lib\/lib.*\.so\..*/d'    $TMP1 >> $TMP2
	pax -w -d < $TMP2 | gzip -9 > ${tardir}/${setname}${RELEASE}.tgz
	echo    "done."
done

echo    "done."