File: update_pd2puredataPatch

package info (click to toggle)
puredata 0.55.2%2Bds-1~bpo12%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 20,336 kB
  • sloc: ansic: 118,788; tcl: 10,221; cpp: 9,327; makefile: 1,632; sh: 1,476; python: 152; xml: 98; awk: 13
file content (31 lines) | stat: -rwxr-xr-x 907 bytes parent folder | download | duplicates (4)
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
#!/bin/sh

## this is a small helper-script to ease updating
## of debian/patches/pd2puredata
##
## the problem with that patch is, that the line that
## needs to be changed contains the version number, and
## is thus updated by upstream for each release, which
## makes quilt fail.
## this script will replace the last-version number in the
## patch by the current version number
##
## (c) 2013-2016 IOhannes m zmölnig

CONFIGUREFILE=configure.ac
PATCHFILE=debian/patches/debian/pd2puredata.patch

PDVERSION=$(cat "${CONFIGUREFILE}" \
		| grep AC_INIT \
		| sed -e 's|^.*,\([^)]*\).*$|\1|')

echo "new Pd-version is ${PDVERSION}"

sed -e "s|^\(.*AC_INIT([^,]*\), *[*[0-9.]*]*)$|\1,${PDVERSION})|g" \
	-i "${PATCHFILE}"

if [ "x${GBP_UPSTREAM_VERSION}" != "x" ]; then
  if git status --porcelain "${PATCHFILE}" | grep . >/dev/null; then
    git commit -m "Refresh pd2puredata patch" "${PATCHFILE}"
  fi
fi