Parent: [ae30e1] (diff)

Download this file

makesrcdist.sh    62 lines (48 with data), 1.2 kB

 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/sh
# @(#$Id: makesrcdist.sh,v 1.1 2009-01-20 13:48:34 dockes Exp $ (C) 2005 J.F.Dockes
# A shell-script to make a pxattr source distribution
fatal()
{
echo $*
exit 1
}
#set -x
TAR=/usr/bin/tar
version=`cat VERSION`
versionforcvs=`echo $version | sed -e 's/\./_/g'`
doxygen Doxyfile
(cd doc/html; hg commit -m "$version" .)
editedfiles=`hg status | egrep -v '^\?'`
if test ! -z "$editedfiles"; then
fatal "Edited files exist: " $editedfiles
fi
tagtop() {
hg tag -m "Release $version tagged" $1 || fatal tag failed
}
targetdir=${targetdir-/tmp}
dotag=${dotag-yes}
if test ! -f pxattr.cpp ; then
echo "Should be executed in the master pxattr directory"
exit 1
fi
topdir=$targetdir/pxattr-$version
if test ! -d $topdir ; then
mkdir $topdir || exit 1
else
echo "Removing everything under $topdir Ok ? (y/n)"
read rep
if test $rep = 'y';then
rm -rf $topdir/*
fi
fi
# Clean up this dir and copy the dist-specific files
make clean
yes | clean.O
$TAR chfX - excludefile . | (cd $topdir;$TAR xf -)
TAG="PXATTR_$versionforcvs"
[ $dotag = "yes" ] && tagtop $TAG
out=pxattr-$version.tar.gz
(cd $targetdir ; \
$TAR chf - pxattr-$version | \
gzip > $out)
echo "$targetdir/$out created"