]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
handle bind/bind9 being a git repo
authorMark Andrews <marka@isc.org>
Mon, 19 Sep 2016 23:50:39 +0000 (09:50 +1000)
committerMark Andrews <marka@isc.org>
Tue, 20 Sep 2016 23:27:36 +0000 (09:27 +1000)
util/bind.sh

index f1ceaa503e0a74c3ad7a6426fb549867b3908921..a66f8a645320bb67e426dc5e669fc26df4631d27 100644 (file)
@@ -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