2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-27 04:28:33 +00:00
bind/util/kit.sh

112 lines
2.6 KiB
Bash
Raw Normal View History

2000-07-28 01:47:16 +00:00
#!/bin/sh
#
2001-01-09 22:01:04 +00:00
# Copyright (C) 2000, 2001 Internet Software Consortium.
#
2000-07-28 01:47:16 +00:00
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
2000-07-28 01:47:16 +00:00
# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
# DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
# INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
# $Id: kit.sh,v 1.21 2001/10/01 20:41:25 gson Exp $
2000-07-28 01:47:16 +00:00
# Make a release kit
#
2000-08-02 16:02:40 +00:00
# Usage: sh kit.sh tag tmpdir
2000-07-28 01:47:16 +00:00
#
# (e.g., sh kit.sh v9_0_0b5 /tmp/bindkit
#
# To build a snapshot release, use the pseudo-tag "snapshot".
#
# (e.g., sh kit.sh snapshot /tmp/bindkit
2000-07-28 01:47:16 +00:00
#
case $# in
2) tag=$1; tmpdir=$2 ;;
2000-08-11 19:58:19 +00:00
*) echo "usage: sh kit.sh cvstag tmpdir" >&2
2000-07-28 01:47:16 +00:00
exit 1
;;
esac
case $tag in
snapshot) tag="HEAD"; snapshot=true ;;
*) snapshot=false ;;
esac
2000-07-28 01:47:16 +00:00
test -d $tmpdir ||
mkdir $tmpdir || {
echo "$0: could not create directory $tmpdir" >&2
exit 1
}
cd $tmpdir || exit 1
cvs checkout -p -r $tag bind9/version >version.tmp
. ./version.tmp
if $snapshot
then
dstamp=`date +'%Y%m%d'`
2000-07-28 01:47:16 +00:00
RELEASETYPE=s
RELEASEVER=$dstamp
fi
version=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}
echo "building release kit for BIND version $version, hold on..."
topdir=bind-$version
2000-07-28 01:47:16 +00:00
test ! -d $topdir || {
echo "$0: directory `pwd`/$topdir already exists" >&2
exit 1
}
cvs -Q export -r $tag -d $topdir bind9
cd $topdir || exit 1
if $snapshot
then
cat <<EOF >version
MAJORVER=$MAJORVER
MINORVER=$MINORVER
PATCHVER=$PATCHVER
RELEASETYPE=$RELEASETYPE
RELEASEVER=$RELEASEVER
EOF
fi
2000-07-28 01:47:16 +00:00
# Omit some files and directories from the kit.
#
# Some of these directories (doc/html, doc/man...) no longer
# contain any files and should therefore be absent in the
# checked-out tree, but they did exist at some point and
# we still delete them from releases just in case something
# gets accidentally resurrected.
2000-08-22 17:28:09 +00:00
rm -rf TODO conftools util doc/design doc/dev doc/expired \
doc/html doc/todo doc/private bin/lwresd doc/man \
lib/lwres/man/resolver.5 \
2001-05-24 02:01:56 +00:00
bin/tests/system/relay lib/cfg
2000-08-22 17:28:09 +00:00
2000-07-28 01:47:16 +00:00
find . -name .cvsignore -print | xargs rm
cd .. || exit 1
kit=$topdir.tar.gz
gtar -c -z -f $kit $topdir
echo "done, kit is in `pwd`/$kit"