File: update-compat

package info (click to toggle)
debmake-doc 1.16-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 15,476 kB
  • sloc: sh: 686; makefile: 668; python: 146; ansic: 114; sed: 16
file content (34 lines) | stat: -rwxr-xr-x 864 bytes parent folder | download
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
#!/bin/sh -e
# vim:se ts=2 sts=2 et ai sw=2 tw=78:
#
# This updates debhelper compat level to the latest.
#
if [ ! -e Packages ]; then
  wget http://ftp.debian.org/debian/dists/sid/main/binary-amd64/Packages.xz
  unxz Packages.xz
fi
COMPAT=$(grep-dctrl -X -n -F Package -s Version debhelper Packages |\
         sed -e 's/\..*//')

rm -f Packages

FILELIST=$(find . -type f -name control)
for f in $FILELIST; do
#  sed -i -e "s/debhelper *([^,]*)/debhelper-compat (= $COMPAT)/" "$f"
  sed -i -e "s/debhelper-compat *( *= *[1-9][0-9]* *)/debhelper-compat (= $COMPAT)/" "$f"
done


find . -type f -name compat -delete


#FILELIST=$(find . -type f -name copyright)
##set -x
#for f in $FILELIST; do
#  if grep  -e "^Upstream-Contact:" "$f" >/dev/null; then
#    echo "$f +++ found   Upstream-Contact:"
#  else
#    echo "$f ... missing Upstream-Contact:"
#  fi
#done