blob: 2a770857d700322898d6f023a0ce3019f466c52a (
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
34
35
36
|
#!/bin/sh
VERSION=@VERSION@
SRCROOT=@CMAKE_SOURCE_DIR@
BUILDDIR=@CMAKE_BINARY_DIR@
PROJECT=@PROJECT_NAME@
GENTOO_VERSION=@GENTOO_VERSION@
EXCLUDE="@DIST_EXCLUDE@"
INCLUDE="@DIST_INCLUDE@"
EXPORT_DIR="${PROJECT}-${VERSION}"
if [ ! -d ${SRCROOT}/.svn ]; then
echo "This script must run for a svn dir!"
exit 1
fi
echo "Exporting source tree"
svn export "${SRCROOT}" ${EXPORT_DIR}
echo "Copy required files to export"
for i in $INCLUDE ; do
echo " $i"
cp ${BUILDDIR}/$i ${EXPORT_DIR}
done
echo "Removing not needed stuff"
for i in $EXCLUDE ; do
echo " $i"
rm -rf $EXPORT_DIR/$i
done
echo "Generating archive"
tar cjf ${BUILDDIR}/${PROJECT}-${VERSION}.tar.bz2 ${EXPORT_DIR}
echo "Cleaning up"
rm -rf ${EXPORT_DIR}
|