forked from kito-cheng/dmtcp-android
-
Notifications
You must be signed in to change notification settings - Fork 2
/
makeRelease.sh
executable file
·65 lines (51 loc) · 1.44 KB
/
makeRelease.sh
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
62
63
64
65
#!/bin/sh
VERSION=`cat VERSION`
VCS_SVN=https://dmtcp.svn.sourceforge.net/svnroot/dmtcp
#run a command with error checking
e() {
echo "$@" >&2
$@ || (echo "ERROR '$@' failed!">&2; exit 1)
}
#get svn revision number
#getRev() {
# if [[ -z "$1" ]]
# then
# getRev .
# else
# (cd $1 && e svn info) | grep '^Revision: [0-9]*' | cut -d ' ' -f 2
# fi
#}
#list a dirs named ".svn"
#removeSvnDirs() {
# find $@ -type d | grep '[.]svn$' | xargs rm -rf
#}
OLDDIR=`pwd`
STAGING=/tmp/dmtcp_release_staging_`whoami`
mkdir -p $STAGING
e cd $STAGING
REV=`(e svn info $VCS_SVN) | grep '^Revision: [0-9]*' | cut -d ' ' -f 2`
echo dmtcp HEAD revision: $REV
if test -z "$DMTCP_USE_SVN_REV"; then
NAME=dmtcp-$VERSION
else
NAME=dmtcp-$VERSION+svn$REV
fi
e svn export -r $REV $VCS_SVN/trunk $NAME
e rm -rf $NAME/{makeRelease.sh}
#REV=`getRev dmtcp_staging`
#e svn co https://dmtcp.svn.sourceforge.net/svnroot/dmtcp/trunk dmtcp_staging
#e mv dmtcp_staging $NAME
#e rm -rf $NAME/{makeRelease.sh}
#e removeSvnDirs
# FIXME: Not sure if we need it anymore, removing it for now. Re-insert if feel
# the need. -- Kapil
#archName=`dpkg-architecture | grep DEB_HOST_ARCH_CPU | \
# sed -e's%DEB_HOST_ARCH_CPU=%%'`
#sed -i -e "s%Architecture: any%Architecture: $archName%" $NAME/debian/control
e fakeroot tar cf $NAME.tar $NAME
e gzip -9 $NAME.tar
e rm -rf $NAME
e mv $NAME.tar.gz $OLDDIR
e cd $OLDDIR
e rm -rf $STAGING
e ls -al $NAME.tar.gz