From db031fd1374a8230e2ff51743e32eaaabccdc98f Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 20 Sep 2016 09:50:39 +1000 Subject: handle bind/bind9 being a git repo --- util/bind.sh | 54 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 24 deletions(-) (limited to 'util/bind.sh') diff --git a/util/bind.sh b/util/bind.sh index f1ceaa50..a66f8a64 100644 --- a/util/bind.sh +++ b/util/bind.sh @@ -97,34 +97,40 @@ case $# in ;; esac -# Delete all previous bind stuff -rm -rf bind +if test -d bind/bind9/.git +then + cp util/Makefile.git bind/Makefile.in + cd bind/bind9 + git checkout $BINDTAG && git pull +else + # Delete all previous bind stuff + rm -rf bind -# Make and move to our directory for all things bind -mkdir $binddir -cp util/Makefile.bind.in bind/Makefile.in -cd $binddir + # Make and move to our directory for all things bind + mkdir $binddir + cp util/Makefile.bind.in bind/Makefile.in + cd $binddir -# Get the bind version file and move it to version.tmp -git archive --format tar $remote $BINDTAG version | tar xf - -mv version version.tmp + # Get the bind version file and move it to version.tmp + git archive --format tar $remote $BINDTAG version | tar xf - + mv version version.tmp -# Get the bind release kit shell script -git archive --format tar $remote master:util/ | tar xf - kit.sh + # Get the bind release kit shell script + git archive --format tar $remote master:util/ | tar xf - kit.sh -# Create the bind tarball, which has the side effect of -# setting up the bind directory we will use for building -# the export libraries -echo Creating tarball for $BINDTAG -sh kit.sh $remote $SNAP $BINDTAG $binddir + # Create the bind tarball, which has the side effect of + # setting up the bind directory we will use for building + # the export libraries + echo Creating tarball for $BINDTAG + sh kit.sh $remote $SNAP $BINDTAG $binddir -. ./version.tmp + . ./version.tmp -version=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER} -bindsrcdir=bind-$version -mm=${MAJORVER}.${MINORVER} - -# move the tar file to a known place for use by the make dist command -echo Moving tar file to bind.tar.gz for distribution -mv bind-${mm}*.tar.gz bind.tar.gz + version=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER} + bindsrcdir=bind-$version + mm=${MAJORVER}.${MINORVER} + # move the tar file to a known place for use by the make dist command + echo Moving tar file to bind.tar.gz for distribution + mv bind-${mm}*.tar.gz bind.tar.gz +fi -- cgit v1.2.1