diff options
author | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2014-07-12 22:03:45 +0000 |
---|---|---|
committer | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2014-07-12 22:03:45 +0000 |
commit | c66962205cf8d2288e11f501bca371b36d6a875b (patch) | |
tree | 6dccc44fd6f5381462f15f02fa9a9ce50b26c42f /etc | |
parent | efd938829cb58c5d78f890e743b4b495486d11f8 (diff) |
Simplify checksum generation for sysmerge.
no objection from deraadt@
Diffstat (limited to 'etc')
-rw-r--r-- | etc/Makefile | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/etc/Makefile b/etc/Makefile index 6a2c8593c23..ef11fc68de4 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.364 2014/07/12 16:00:27 ajacoutot Exp $ +# $OpenBSD: Makefile,v 1.365 2014/07/12 22:03:44 ajacoutot Exp $ TZDIR= /usr/share/zoneinfo LOCALTIME= Canada/Mountain @@ -255,15 +255,16 @@ distribution: cd .. && exec ${SUDO} ${MAKE} install touch ${DESTDIR}/var/db/sysmerge/etcsum touch ${DESTDIR}/var/db/sysmerge/egsum - TMPSUM=`mktemp /tmp/_etcsum.XXXXXXXXXX` || exit 1; \ - EGSUM=`mktemp /tmp/_egsum.XXXXXXXXXX` || exit 1; \ - sort ../distrib/sets/lists/etc/{mi,md.${MACHINE}} > $${TMPSUM}; \ - grep -h '/etc/examples/' ../distrib/sets/lists/base/{mi,md.${MACHINE}} > $${EGSUM}; \ + ETCLIST=`mktemp /tmp/_etclist.XXXXXXXXXX` || exit 1; \ + sort ../distrib/sets/lists/etc/{mi,md.${MACHINE}} > $${ETCLIST}; \ cd ${DESTDIR} && \ - xargs sha256 < $${TMPSUM} > ${DESTDIR}/var/db/sysmerge/etcsum; \ + xargs sha256 -h ${DESTDIR}/var/db/sysmerge/etcsum < $${ETCLIST} + rm -f $${ETCLIST} + EGLIST=`mktemp /tmp/_eglist.XXXXXXXXXX` || exit 1; \ + grep -h '/etc/examples/' ../distrib/sets/lists/base/{mi,md.${MACHINE}} | sort > $${EGLIST}; \ cd ${DESTDIR} && \ - xargs sha256 < $${EGSUM} > ${DESTDIR}/var/db/sysmerge/egsum; \ - rm -f $${TMPSUM} $${EGSUM} + xargs sha256 -h ${DESTDIR}/var/db/sysmerge/egsum < $${EGLIST}; \ + rm -f $${EGLIST} distrib-dirs: if [ ! -d ${DESTDIR}/. ]; then \ |