-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.sh
57 lines (48 loc) · 1.25 KB
/
build.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
#!/bin/bash
cd /tmp
rm -rf uckbuild
mkdir uckbuild
cd uckbuild
svn co https://uck.svn.sourceforge.net/svnroot/uck/trunk/uck
cd uck
VERSION=`cat VERSION`
# renaming uck dir adding version
cd ..
mv uck uck-$VERSION
tar zcf uck_$VERSION.orig.tar.gz uck-$VERSION
cd uck-$VERSION
# checking if version number has been updated everywhere
MAN_FILES=`ls docs/man/*.1 | wc -l`
MAN_FILES_WITH_VERSION=`grep "$VERSION" docs/man/*.1 | wc -l`
if [ $MAN_FILES -ne $MAN_FILES_WITH_VERSION ]; then
echo "ERROR: you've to update version number in all man pages"
exit
fi
if [ "`grep "$VERSION" debian/changelog | wc -l`" -eq "0" ]; then
echo "ERROR: you've to update version number in debian/changelog"
exit
fi
# cleaning
rm -rf `find -name .svn`
rm -rf logo
rm -rf build.sh
rm -rf localbuild.sh
rm -rf Makefile
rm -rf SUITE
# generating deb package
KEY=063FFBAE
CALLER="Fabrizio Balliano <[email protected]>"
dpkg-buildpackage -k$KEY
# generating source package
rm -rf debian
cd ..
tar cfp uck_$VERSION.tar uck-$VERSION
gzip -9 uck_$VERSION.tar
# just a note
echo
echo
echo
echo "########################################################"
echo "# Generation completed, find packages in /tmp/uckbuild #"
echo "########################################################"
echo