File: make-distribution

package info (click to toggle)
otags 3.09.3-4
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 372 kB
  • ctags: 296
  • sloc: ml: 1,004; sh: 309; makefile: 122
file content (95 lines) | stat: -rwxr-xr-x 1,527 bytes parent folder | download | duplicates (2)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/bin/bash

fast=0

function usage(){
    echo "usage: make-distribution [-fast]"
    exit 1
}


while [ $# \!= 0 ]; do
    case $1 in
	-fast)		fast=1;
	    		shift;;
	*)		echo `basename $0` : unknown option $1;
		        usage;
			shift;;
    esac;
done



branch=$(cvs status Makefile | awk  '/Sticky Tag/ {print $3;}')
if [ $branch = '(none)' ] ; then
    branch=HEAD
fi

echo using branch $branch

export CVSROOT=$(cat CVS/Root)
echo using CVSROOT $CVSROOT


echo make depend
make depend > /dev/null
if [ $? != 0 ] ; then
    echo make depend failed
    echo exit 1
fi

cvs status Makefile.depend | grep -q Up-to-date
if [ $? != 0 ] ; then
    echo Makefile.depend not up to date
    echo exit 1
else
    echo Makefile.depend up to date
fi

tmpdir=/tmp/tews
if [ -x ./otags ] ; then
    name=$(./otags -version | tr ' ' -)
else
    echo need ./otags to extract version!
    exit 1
fi

rm -rf $tmpdir/$name

pushd $tmpdir
set -x
cvs export -d $name -r $branch Otags > /dev/null
set +x

filestodelete="test/lablgtk* test/ccslc* ImportVendor"

for f in $filestodelete ; do
    rm -f $name/$f
done

tar -czf $name.tar.gz $name

popd

rm -rf $tmpdir/test-otags*

set -e
if [ $fast = 0 ] ; then
    ./test-distribution byte --bytecode
fi
./test-distribution native
set +e


webdir=lilo:web-docs/otags

echo
echo scp doc/index.html $tmpdir/$name.tar.gz README CHANGES $webdir
echo -n [N/y]?
read answer

if [  ${answer:=n} = n -o $answer = N ] ; then
    exit 0
fi

scp doc/index.html $tmpdir/$name.tar.gz README CHANGES $webdir