Debian Codegraph @

debian/update_pd2puredataPatch

raw
1 #!/bin/sh
2
3 ## this is a small helper-script to ease updating
4 ## of debian/patches/pd2puredata
5 ##
6 ## the problem with that patch is, that the line that
7 ## needs to be changed contains the version number, and
8 ## is thus updated by upstream for each release, which
9 ## makes quilt fail.
10 ## this script will replace the last-version number in the
11 ## patch by the current version number
12 ##
13 ## (c) 2013-2016 IOhannes m zmölnig
14
15 CONFIGUREFILE=configure.ac
16 PATCHFILE=debian/patches/debian/pd2puredata.patch
17
18 PDVERSION=$(cat "${CONFIGUREFILE}" \
19 | grep AC_INIT \
20 | sed -e 's|^.*,\([^)]*\).*$|\1|')
21
22 echo "new Pd-version is ${PDVERSION}"
23
24 sed -e "s|^\(.*AC_INIT([^,]*\), *[*[0-9.]*]*)$|\1,${PDVERSION})|g" \
25 -i "${PATCHFILE}"
26
27 if [ "x${GBP_UPSTREAM_VERSION}" != "x" ]; then
28 if git status --porcelain "${PATCHFILE}" | grep . >/dev/null; then
29 git commit -m "Refresh pd2puredata patch" "${PATCHFILE}"
30 fi
31 fi