0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 17:51:53 +00:00

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).
This commit is contained in:
Ondrej Zajicek (work) 2021-04-22 19:23:18 +02:00
parent 280d133a9b
commit 312aeda393

View File

@ -11,28 +11,22 @@ VERSION=$BIRD_VERSION.$TIMESTAMP.$GIT_HASH
REL=bird-$VERSION REL=bird-$VERSION
T=/tmp/bird T=/tmp/bird
AC=autoreconf
set -e set -e
# prepare output dir # prepare output dir
rm -rf $T/$REL rm -rf $T/$REL $T/$REL.tar.gz
mkdir -p $T/$REL mkdir -p $T
$AC
# cleanup
find . -name "*~" -exec rm -f '{}' '+'
rm -rf autom4te*cache
echo Building $REL 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 echo Generating ChangeLog
git log >$T/$REL/ChangeLog git log >$T/$REL/ChangeLog
rm -f $T/$REL/bird.conf* rm -f $T/$REL/bird.conf*
rm -rf $T/$REL/.git/ rm -rf $T/$REL/misc $T/$REL/doc/slides $T/$REL/doc/slt2001 $T/$REL/doc/old
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 czf $REL.tar.gz $REL )
( cd $T ; tar czvvf $REL.tar.gz $REL )
rm -rf $T/$REL rm -rf $T/$REL
echo $T/$REL.tar.gz echo $T/$REL.tar.gz