]> git.decadent.org.uk Git - dak.git/blob - scripts/backports.org/mkmaintainers
merge from ftp-master
[dak.git] / scripts / backports.org / mkmaintainers
1 #! /bin/sh
2
3 echo
4 echo -n 'Creating Maintainers index ... '
5
6 set -e
7 . $SCRIPTVARS
8 cd $base/misc/
9
10 nonusmaint="$base/misc/Maintainers_Versions-non-US"
11
12
13 cd $indices
14 dak make-maintainers | sed -e "s/~[^  ]*\([   ]\)/\1/"  | awk '{printf "%-20s ", $1; for (i=2; i<=NF; i++) printf "%s ", $i; printf "\n";}' > .new-maintainers
15
16 set +e
17 cmp .new-maintainers Maintainers >/dev/null
18 rc=$?
19 set -e
20 if [ $rc = 1 ] || [ ! -f Maintainers ] ; then
21         echo -n "installing Maintainers ... "
22         mv -f .new-maintainers Maintainers
23         gzip -9v <Maintainers >.new-maintainers.gz
24         mv -f .new-maintainers.gz Maintainers.gz
25 elif [ $rc = 0 ] ; then
26         echo '(same as before)'
27         rm -f .new-maintainers
28 else
29         echo cmp returned $rc
30         false
31 fi