Christian Weisgerber:
> Admittedly, this is cosmetic:
> Use the modern POSIX idiom "-exec ... {} +" instead of find|xargs.
tb@ kindly pointed out to me that Klemens Nanni submitted a better
patch for this four months ago; "-exec +" allows us to combine the
two find invocations into one:
https://marc.info/?l=openbsd-tech&m=149649423503939
ok?
Index: include/Makefile
===================================================================
RCS file: /cvs/src/include/Makefile,v
retrieving revision 1.219
diff -u -p -r1.219 Makefile
--- include/Makefile 17 Apr 2017 15:53:21 -0000 1.219
+++ include/Makefile 6 Oct 2017 14:25:47 -0000
@@ -100,10 +100,9 @@ includes:
cd ${.CURDIR}/$$i && ${RUN_MAKE}; \
done
chown -RP ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
- find ${DESTDIR}/usr/include -type f -print0 | \
- xargs -0r chmod a=r
- find ${DESTDIR}/usr/include \( -type d -o -type l \) -print0 | \
- xargs -0r chmod -h u=rwx,go=rx
+ find ${DESTDIR}/usr/include \
+ -type f -exec chmod a=r {} + -o \
+ \( -type d -o -type l \) -exec chmod -h u=rwx,go=rx {} +
copies:
@echo copies: ${LDIRS}
Index: share/zoneinfo/Makefile
===================================================================
RCS file: /cvs/src/share/zoneinfo/Makefile,v
retrieving revision 1.11
diff -u -p -r1.11 Makefile
--- share/zoneinfo/Makefile 24 Nov 2016 14:38:30 -0000 1.11
+++ share/zoneinfo/Makefile 6 Oct 2017 14:30:23 -0000
@@ -81,8 +81,9 @@ realinstall: ${DATA} ${REDO} ${YEARISTYP
(cd ${.CURDIR}/datfiles; \
${ZIC} -y ${YEARISTYPECOPY} -d ${TZDIR} -p ${POSIXRULES})
chown -R ${BINOWN}:${BINGRP} ${TZDIR}
- find ${TZDIR} -type f -print0 | xargs -0r chmod a=r
- find ${TZDIR} -type d -print0 | xargs -0r chmod a=rx
+ find ${TZDIR} \
+ -type f -exec chmod a=r {} + -o \
+ -type d -exec chmod a=rx {} +
${INSTALL} -c -o root -g bin -m 644 ${.CURDIR}/datfiles/iso3166.tab \
${DESTDIR}/usr/share/misc
${INSTALL} -c -o root -g bin -m 644 ${.CURDIR}/datfiles/zone.tab \
--
Christian "naddy" Weisgerber [email protected]