summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorMark Andrews <marka@isc.org>2016-09-20 09:50:39 +1000
committerMark Andrews <marka@isc.org>2016-09-21 09:27:36 +1000
commitdb031fd1374a8230e2ff51743e32eaaabccdc98f (patch)
tree5bfb06ce9422e14c4841f2b2801439a544f76664 /util
parente675b663590ffee8d300694be80effc4e1447094 (diff)
downloadisc-dhcp-db031fd1374a8230e2ff51743e32eaaabccdc98f.tar.gz
handle bind/bind9 being a git repo
Diffstat (limited to 'util')
-rw-r--r--util/bind.sh54
1 files changed, 30 insertions, 24 deletions
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