summaryrefslogtreecommitdiff
path: root/mkdist
blob: 25182fbaa57c5f68d1955443848443a50ff0dc85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh -e

# Create ltrace-${version}.tar.gz from a GIT repository

if [ ! -d .git -o ! -f libltrace.c ]
then
  echo "This must be called inside a ltrace GIT repository" 1>&2
  exit 1
fi

VERSION=$( cat VERSION )

echo Building ltrace-$VERSION.tar.gz ...
rm -rf ltrace-$VERSION
git clone ./ ltrace-$VERSION >/dev/null
GZIP=-9 tar --exclude .git -zcf ltrace-$VERSION.tar.gz ltrace-$VERSION
rm -rf ltrace-$VERSION
echo Done.