RSS

(root)/ani/mrses : /release.sh (revision 2)

To get this branch, use:
bzr branch /webbzr/ani/mrses
Line Revision Contents
1 1
#! /bin/bash
2
3
RDIR=~/releases
4
5
6
if [ ! -d $RDIR ]; then
7
    if [ -a $RDIR ]; then
8
	echo "Release directory isn't a directory!"
9
	exit
10
    fi
11
    mkdir -p $RDIR
12
fi
13
14
version=`cat VERSION | perl -e "while (<STDIN>) {  if (m/(\d+\.\d+(.\d+)?)/) { print \\$1; } }"`
15
cvs=`cat VERSION | perl -e "while (<STDIN>) {  if (m/\d+\.\d+(.\d+)?.*(cvs|CVS|Cvs)/) { print 'cvs'; } }"`
16
if [ "$cvs" == "cvs" ]; then
17
    rname="mrses-`date +%y%m%d.%H%M%S`"
18
    lname="ppclibs-`date +%y%m%d.%H%M%S`"
19
else
20
    rname="mrses-$version";
21
    lname="ppclibs-$version";
22
fi
23
if [ -d $RDIR/$rname ]; then
24
    rm -rf $RDIR/$rname
25
fi
26
mkdir -p $RDIR/$rname
27
if [ ! -d $RDIR/$rname ]; then
28
    echo "Can't create directory!!!"
29
    exit
30
fi
31
cp -a * $RDIR/$rname
32
#cp -al * $RDIR/$rname
33
34
(
35
    cd $RDIR/$rname
36
    make clean -C cell
37
    rm -f cell/mrses_hw.mex*
38
    rm -f cell/spu/*.[od]
39
40
    if [ -a ../$lname.tar ]; then
41
	rm -f ../$lname.tar
42
    fi
43
    tar cf ../$lname.tar libs
44
    rm -rf libs
45
    
46
    cd ..
47
48
    if [ -a $rname.tar.bz2 ]; then
49
	rm -f $rname.tar.bz2
50
    fi
51
    tar cjf $rname.tar.bz2 $rname
52
    rm -rf $rname
53
#    scp $rname.tar.bz2 csa@crdcell:/home/csa/
54
#    ssh csa@crdcell /home/csa/mrses_install.sh $rname
55
)

Loggerhead 1.18.1 is a web-based interface for Bazaar branches