~ubuntu-branches/ubuntu/utopic/exabgp/utopic

« back to all changes in this revision

Viewing changes to dev/release/google

  • Committer: Package Import Robot
  • Author(s): Henry-Nicolas Tourneur
  • Date: 2014-03-08 19:07:00 UTC
  • mfrom: (1.1.8)
  • Revision ID: package-import@ubuntu.com-20140308190700-xjbibpg1g6001c9x
Tags: 3.3.1-1
* New upstream release
* Bump python minimal required version (2.7)
* Closes: #726066 Debian packaging improvements proposed by Vincent Bernat
* Closes: #703774 not existent rundir (/var/run/exabgp) after reboot

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
me=`id -u`
 
4
 
 
5
if [ $me -eq 0 ]; then
 
6
        echo 'root is not allowed to use this script'
 
7
        exit 1
 
8
fi
 
9
 
 
10
dirname=`dirname $0`
 
11
 
 
12
if [[ $dirname == /* ]]; then
 
13
        path=$dirname/../..
 
14
else
 
15
        cd `pwd`/$dirname/../.. > /dev/null
 
16
        path=`pwd`
 
17
        cd - > /dev/null
 
18
fi
 
19
 
 
20
# This is not safe against race condition, but I trust my own machine to not be hacked ..
 
21
 
 
22
build=/tmp
 
23
version=`/usr/bin/env python $path/lib/exabgp/version.py`
 
24
name=exabgp-$version
 
25
destination=$build/$name
 
26
 
 
27
echo destination is $destination
 
28
rm -rf $destination
 
29
mkdir $destination
 
30
 
 
31
# Adding the files and folders
 
32
 
 
33
echo adding the files
 
34
 
 
35
cd $path
 
36
for f in `ls`;
 
37
do
 
38
        echo copying $f
 
39
        cp -r $f $destination/
 
40
done
 
41
 
 
42
# Removing all the non-commited files (normally test configurations)
 
43
 
 
44
echo removing unreleased file
 
45
 
 
46
internal=`hg status | grep "^?" | awk '{ print $2; }'`
 
47
 
 
48
cd $destination
 
49
for f in $internal;
 
50
do
 
51
        echo removing $f
 
52
        rm -f $f
 
53
done
 
54
cd -
 
55
 
 
56
echo removing pyc files
 
57
 
 
58
cd $destination
 
59
for f in `find . -name "*.pyc"`;
 
60
do
 
61
        echo removing $f
 
62
        rm -f $f
 
63
done
 
64
cd -
 
65
 
 
66
echo removing dot files
 
67
 
 
68
cd $destination
 
69
for f in `find . -name ".?*"`;
 
70
do
 
71
        echo removing $f
 
72
        rm -f $f
 
73
done
 
74
cd -
 
75
 
 
76
echo removing orig files
 
77
 
 
78
cd $destination
 
79
for f in `find . -name "*.orig"`;
 
80
do
 
81
        echo removing $f
 
82
        rm -f $f
 
83
done
 
84
cd -
 
85
 
 
86
cd $destination
 
87
for f in `find . -name "rfc*.txt"`;
 
88
do
 
89
        echo removing $f
 
90
        rm -f $f
 
91
done
 
92
for f in `find . -name "draft-*.txt"`;
 
93
do
 
94
        echo removing $f
 
95
        rm -f $f
 
96
done
 
97
cd -
 
98
 
 
99
# Making tarball
 
100
 
 
101
echo making tarbal
 
102
 
 
103
# Telling MACs to not include the ._ version of the files
 
104
export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
 
105
export COPYFILE_DISABLE=true
 
106
 
 
107
cd $path
 
108
rm -f ${name}.tgz
 
109
 
 
110
cd $build
 
111
rm -f ${name}.tgz
 
112
tar zcvf $path/${name}.tgz $name
 
113
 
 
114
echo 'done'