blob: d94a9432f222d0c0719d37cb9359dbff1b54c919 (
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
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
|
#!/bin/sh
set -e
DSC="$1"
TMPDIR="$(mktemp -d -p . dpkg-source.XXXX)"
############ upstream
git checkout upstream
( find | grep -v '^./.git/.*' | grep -v './.git$' | xargs rm -rf ) || true
dpkg-source -x --no-copy --skip-debianization ${DSC} ${TMPDIR}
cd "${TMPDIR}"
rm -rf .git
mv $(find -mindepth 1 -maxdepth 1) ../
cd "${OLDPWD}"
rmdir ${TMPDIR}
VERSION="$(awk '/^Version: / { print $2 }' ${DSC} | head -n1)"
FILE_VERSION="$(echo ${VERSION} | awk -F: '{ print $2 }')"
FILE_VERSION="${FILE_VERSION:-${VERSION}}"
git-upstream-add ${VERSION}
############## debian
git checkout debian
git cherry-pick -n upstream
git commit -a -s -S -m "Merging upstream version ${VERSION}."
rm -rf debian
if [ -e $(dirname ${DSC})/$(basename ${DSC} .dsc).diff.gz ]
then
zcat $(dirname ${DSC})/$(basename ${DSC} .dsc).diff.gz | patch -Np1
fi
if ls $(dirname ${DSC})/$(basename ${DSC} .dsc).debian.tar.* > /dev/null 2>&1
then
tar xf $(dirname ${DSC})/$(basename ${DSC} .dsc).debian.tar.*
fi
git-debian-add
################ progress-linux / bfh
if git branch | grep -qs progress-linux
then
BRANCH="progress-linux"
elif git branch | grep -qs bfh
then
BRANCH="bfh"
fi
git checkout ${BRANCH}
git cherry-pick -n upstream
git commit -a -s -S -m "Merging upstream version ${VERSION}."
git cherry-pick -n debian
DEBIAN_VERSION="$(dpkg-parsechangelog | awk '/^Version: / { print $2 }')"
git commit -a -s -S -m "Merging debian version ${DEBIAN_VERSION}."
|