2006-11-27 04:25:45 -07:00
|
|
|
#!/bin/sh
|
2007-03-28 14:07:23 -06:00
|
|
|
# $OpenBSD: maketars,v 1.2 2007/03/28 20:07:23 todd Exp $
|
2006-11-27 04:25:45 -07:00
|
|
|
|
|
|
|
# xy
|
|
|
|
RELEASE=$1
|
|
|
|
Release=$2
|
|
|
|
# x.y
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2007-03-28 14:07:23 -06:00
|
|
|
TMPDIR=`mktemp -d /tmp/_maketarsx.XXXXXXXXXX`
|
|
|
|
trap 'rm -f $TMP1 $TMP2; rmdir $TMPDIR; exit 1' 1 15
|
|
|
|
TMP1=$TMPDIR/one
|
|
|
|
TMP2=$TMPDIR/two
|
|
|
|
|
2006-11-27 04:25:45 -07:00
|
|
|
lists=`sh ./genlists $arch`
|
|
|
|
|
|
|
|
cd $DESTDIR
|
|
|
|
|
|
|
|
for setname in $lists; do
|
|
|
|
echo -n "${setname}: "
|
2007-03-28 14:07:23 -06:00
|
|
|
(cd $pwd; sh gensetlist $setname $Release) | sort > $TMP1
|
|
|
|
grep '^./usr/X11R6/lib' $TMP1 > $TMP2
|
|
|
|
grep -v '^./usr/X11R6/lib' $TMP1 >> $TMP2
|
|
|
|
pax -w -d < $TMP2 | gzip -9 > ${tardir}/${setname}${RELEASE}.tgz
|
2006-11-27 04:25:45 -07:00
|
|
|
echo "done."
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "done."
|