summaryrefslogtreecommitdiffhomepage
path: root/make_release.sh
blob: 68bb0705c4e2673747ea6738342f1edaaf367530 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh

#set -x
WORKDIR="release"
VERSION="0.9.13"
RELEASEDIR="cparser-$VERSION"
FULLRELEASEDIR="$WORKDIR/$RELEASEDIR"
RELEASEFILE="cparser-$VERSION.tar.bz2"
SOURCEDIRS="adt builtins driver win32 wrappergen ."
ADDFILES="README.md NEWS.md AUTHOR COPYING cparser.1"

rm -rf "$FULLRELEASEDIR"

echo "Preparing $FULLRELEASEDIR"
mkdir -p "$WORKDIR"
mkdir -p "$FULLRELEASEDIR"

for dir in $SOURCEDIRS; do
	mkdir -p "$FULLRELEASEDIR/$dir"
	cp -p "$dir/"*.sh "$FULLRELEASEDIR/$dir"
	cp -p "$dir/"*.def "$FULLRELEASEDIR/$dir"
	cp -p "$dir/"*.inc "$FULLRELEASEDIR/$dir"
	cp -p "$dir/"*.[ch] "$FULLRELEASEDIR/$dir"
	cp -p "$dir/"*.[ch].* "$FULLRELEASEDIR/$dir"
done
cp $ADDFILES "$FULLRELEASEDIR"
rm -f "$FULLRELEASEDIR/revision.h"
rm -f "$FULLRELEASEDIR/config.h"
echo "REVISION = \"$VERSION\"" > "$FULLRELEASEDIR/Makefile"
cat Makefile >> "$FULLRELEASEDIR/Makefile"

echo "creating $RELEASEFILE"
tar cjf "$RELEASEFILE" -C "$WORKDIR" "$RELEASEDIR"