File: autogen.sh

package info (click to toggle)
xz-utils 5.2.2-1.2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 7,264 kB
  • ctags: 2,862
  • sloc: ansic: 24,113; sh: 5,394; makefile: 746; asm: 295; sed: 16
file content (32 lines) | stat: -rwxr-xr-x 776 bytes parent folder | download | duplicates (11)
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
#!/bin/sh
# Generate debian/changelog.upstream, debian/generated-m4.list,
# and debian/generated-po.list.
#
# Uses debian/changelog, the git revision log, and .gitignore
# files from the current checkout.

set -e

changelog_needs_update() {
	test -e debian/changelog.upstream &&
	read line < debian/changelog.upstream ||
	return 0

	ver=${line#Version } &&
	ver=${ver%;*} &&
	test "$ver" != "" ||
	return 0

	read line < debian/changelog &&
	rhs=${line#*(} &&
	deb_ver=${rhs%)*} &&
	new_ver=${deb_ver%-*} ||
	return 0

	test "$ver" != "$new_ver"
}

cp -f m4/.gitignore debian/generated-m4.list
cp -f po/.gitignore debian/generated-po.list
sed -n 's,^build-aux/,, p' .gitignore > debian/generated-build-aux.list
! changelog_needs_update || exec sh debian/changelog.upstream.sh