blob: 51a79144475a05c08971c4b07817a0461fd7f125 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/bash
DIST="$(lsb_release -i -s)"
RELEASE="$(lsb_release -c -s)"
if [ "${DIST}" = "Debian" ]; then
VERSION="$(cat /etc/debian_version)"
VERSION="${VERSION%%.*}"
PREFIX="~deb"
elif [ "${DIST}" = "Ubuntu" ]; then
VERSION="$(lsb_release -r -s)"
PREFIX="-ubuntu"
else
echo "Unknown Distribution '${DIST}'"
exit 1
fi
if ! [[ "${VERSION}" =~ .*/sid ]]; then
git checkout debian/changelog
dch --local ${PREFIX}${VERSION}+ --distribution ${RELEASE} "Rebuild for ${RELEASE}" || exit
fi
debian/bin/gencontrol.sh "${@}"
dpkg-buildpackage -uc -b -nc
|