kit.sh revision 92e80317ea556ab5b9f90260b3799b35493daedd
#
# Copyright (C) 2004, 2007-2010, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2000-2003 Internet Software Consortium.
#
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL ISC 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$
# Make a release kit
#
# Usage: sh kit.sh tag tmpdir
#
#
# To build a snapshot release, use the pseudo-tag "snapshot".
#
#
case "${1:-}" in
--remote=*)
remote="${1}"
shift
;;
esac
case $# in
3)
case "$1" in
snapshot) ;;
*) echo "usage: sh kit.sh [snapshot] gittag tmpdir" >&2
exit 1
;;
esac
snapshot=true;
releasetag=$2
tag=$2
tmpdir=$3
;;
2)
tag=$1
tmpdir=$2
*) snapshot=false ;;
esac
;;
*) echo "usage: sh kit.sh [snapshot] gittag tmpdir" >&2
exit 1
;;
esac
# create tmpdir
test -d $tmpdir ||
exit 1
}
cd $tmpdir || {
echo "$0: cd $tmpdir failed"
exit 1
}
exit 1
}
echo "$0: could not get 'version' file" >&2
exit 1
}
if $snapshot
then
dstamp=$1
shift
tag="$@"
;;
*)
tag="$@"
;;
esac
fi
echo "building release kit for BIND version $version, hold on..."
test ! -d $topdir || {
exit 1
}
cd $topdir || exit 1
if $snapshot
then
cat <<EOF >version
MAJORVER=$MAJORVER
MINORVER=$MINORVER
PATCHVER=$PATCHVER
RELEASETYPE=$RELEASETYPE
RELEASEVER=$RELEASEVER
EOF
fi
# Omit some files and directories from the kit.
#
# 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.
# Remove everything but mksymtbl.pl from util
# Remove all .gitignore files
# Remove branchsync.dat, if present
rm -f branchsync.dat
# populate srcid file
echo "SRCID=$shorthash" > srcid
# The following files should be executable.
# Fix up releases with libbind.
then
fi
# Fix files which should be using DOS style newlines
winnames="-name *.mak -or -name *.dsp -or -name *.dsw -or -name *.txt -or -name *.bat"
do
done
# check that documentation has been updated properly; issue a warning
# if it hasn't
ok=
do
then
fi
done
then
echo "WARNING: ARM source is newer than the html version."
fi
then
echo "WARNING: ARM source is newer than the PDF version."
fi
do
docbookfile=$f
then
echo "WARNING: $docbookfile is newer than the html version."
fi
done
# build the tarball
cd .. || exit 1