summaryrefslogtreecommitdiffstats
path: root/arch/tde-deps/pod2man/pkgsum.sh
blob: e908ad353016efe634dca75f919873ab6ea50dec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env bash

#taken from https://bbs.archlinux.org/viewtopic.php?id=131666 by falconindy
awk -v newsums="$(makepkg -g)" '
BEGIN {
  if (!newsums) exit 1
}

/^[[:blank:]]*(md|sha)[[:digit:]]+sums=/,/\)[[:blank:]]*$/ {
  if (!i) print newsums; i++
  next
}

1
' PKGBUILD > PKGBUILD.new && mv PKGBUILD{.new,}