summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2021-04-22 19:23:18 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2021-05-19 17:22:12 +0200
commit312aeda393f9775f603a78c7feb0a11f3c789c02 (patch)
treef138eb3b9bcc90484e2affffe13443dbfa9eca5c
parent280d133a9b50dab88d51871927f26cd967211f85 (diff)
Tools: Improve make-dev-archive
Use git-archive to avoid unrelated and temporary files and fix some minor issues (e.g. dependency on bash as system shell).
-rwxr-xr-xtools/make-dev-archive22
1 files changed, 8 insertions, 14 deletions
diff --git a/tools/make-dev-archive b/tools/make-dev-archive
index 227d029f..caaee121 100755
--- a/tools/make-dev-archive
+++ b/tools/make-dev-archive
@@ -11,28 +11,22 @@ VERSION=$BIRD_VERSION.$TIMESTAMP.$GIT_HASH
REL=bird-$VERSION
T=/tmp/bird
-AC=autoreconf
set -e
# prepare output dir
-rm -rf $T/$REL
-mkdir -p $T/$REL
-
-$AC
-
-# cleanup
-find . -name "*~" -exec rm -f '{}' '+'
-rm -rf autom4te*cache
+rm -rf $T/$REL $T/$REL.tar.gz
+mkdir -p $T
echo Building $REL
-cp -a . $T/$REL
+git archive --format=tar --prefix=$REL/ HEAD | (cd $T && tar xf -)
+echo Running autoreconf
+( cd $T/$REL ; autoreconf ; rm -rf autom4te*cache )
echo Generating ChangeLog
-git log >$T/$REL/ChangeLog
+git log >$T/$REL/ChangeLog
rm -f $T/$REL/bird.conf*
-rm -rf $T/$REL/.git/
-rm -rf `find $T/$REL -name CVS -o -name tmp` $T/$REL/{misc,rfc,doc/slides,doc/slt2001,doc/old,doc/*.out}
-( cd $T ; tar czvvf $REL.tar.gz $REL )
+rm -rf $T/$REL/misc $T/$REL/doc/slides $T/$REL/doc/slt2001 $T/$REL/doc/old
+( cd $T ; tar czf $REL.tar.gz $REL )
rm -rf $T/$REL
echo $T/$REL.tar.gz