File: google

package info (click to toggle)
exabgp 4.2.25-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,612 kB
  • sloc: python: 37,482; sh: 581; perl: 31; makefile: 23
file content (114 lines) | stat: -rwxr-xr-x 1,744 bytes parent folder | download | duplicates (6)
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#!/bin/sh

me=`id -u`

if [ $me -eq 0 ]; then
	echo 'root is not allowed to use this script'
	exit 1
fi

dirname=`dirname $0`

if [[ $dirname == /* ]]; then
        path=$dirname/../..
else
        cd `pwd`/$dirname/../.. > /dev/null
        path=`pwd`
        cd - > /dev/null
fi

# This is not safe against race condition, but I trust my own machine to not be hacked ..

build=/tmp
version=`/usr/bin/env python $path/lib/exabgp/version.py`
name=exabgp-$version
destination=$build/$name

echo destination is $destination
rm -rf $destination
mkdir $destination

# Adding the files and folders

echo adding the files

cd $path
for f in `ls`;
do
	echo copying $f
	cp -r $f $destination/
done

# Removing all the non-commited files (normally test configurations)

echo removing unreleased file

internal=`hg status | grep "^?" | awk '{ print $2; }'`

cd $destination
for f in $internal;
do
	echo removing $f
	rm -f $f
done
cd -

echo removing pyc files

cd $destination
for f in `find . -name "*.pyc"`;
do
	echo removing $f
	rm -f $f
done
cd -

echo removing dot files

cd $destination
for f in `find . -name ".?*"`;
do
	echo removing $f
	rm -f $f
done
cd -

echo removing orig files

cd $destination
for f in `find . -name "*.orig"`;
do
	echo removing $f
	rm -f $f
done
cd -

cd $destination
for f in `find . -name "rfc*.txt"`;
do
        echo removing $f
        rm -f $f
done
for f in `find . -name "draft-*.txt"`;
do
        echo removing $f
        rm -f $f
done
cd -

# Making tarball

echo making tarbal

# Telling MACs to not include the ._ version of the files
export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
export COPYFILE_DISABLE=true

cd $path
rm -f ${name}.tgz

cd $build
rm -f ${name}.tgz
tar zcvf $path/${name}.tgz $name

echo 'done'