forked from onotelli/justniffer
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild_debian.sh
More file actions
executable file
·39 lines (28 loc) · 872 Bytes
/
build_debian.sh
File metadata and controls
executable file
·39 lines (28 loc) · 872 Bytes
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
#!/bin/bash
#dpkg-buildpackage -rfakeroot
DIST=$1
CREATE=$2
PYTHON=$3
if [ "$DIST" == "--help" ]; then
echo "usage ./build_debian.sh <distro> [create|nocreate] [python|nopython] "
exit
fi
VERSION=`grep VERSION include/config.h| awk '{print $3}'| tail -1| tr --delete \"`
if test "$DIST" == ""; then
DIST=`cat /etc/lsb-release| grep DISTRIB_CODENAME| awk -F= '{print $2}'`
echo "distro codename not specified: assumed $DIST"
fi
if [ "$CREATE" == "create" ]; then
echo "sudo DIST=$DIST pbuilder create"
fi
if [ "$python" == "python" ]; then
cp debian/control.python debian/control
esle
cp debian/control.nopython debian/control
fi
dpkg-buildpackage
echo "sudo DIST=$DIST pbuilder build ../justniffer_$VERSION.dsc "
if [ "$CREATE" == "create" ]; then
sudo DIST=$DIST pbuilder create
fi
sudo DIST=$DIST pbuilder build ../justniffer_$VERSION.dsc