From c44d975f657a7305209b839cd79c7dea2596f807 Mon Sep 17 00:00:00 2001 From: Alexey Dokuchaev Date: Thu, 30 Jun 2016 06:33:21 +0000 Subject: Simplify custom `update-distinfo' convenience target and make it more robust: previous join(1)-based implementation depended on how the file is sorted and often failed to work properly. While here, do not suppress default `.bak' suffix when editing files in-place to make debugging easier, shall it be needed. --- x11/nvidia-driver/Makefile | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'x11/nvidia-driver') diff --git a/x11/nvidia-driver/Makefile b/x11/nvidia-driver/Makefile index 4387ed141a88..8dd46ad7456c 100644 --- a/x11/nvidia-driver/Makefile +++ b/x11/nvidia-driver/Makefile @@ -312,16 +312,13 @@ post-install: .SILENT # update distinfo (i.e., keeping other driver version entries intact) .if ${.TARGETS:Mupdate-distinfo} DISTINFO_FILE= ${MASTERDIR}/distinfo.new -JOIN?= /usr/bin/join .endif update-distinfo: makesum .SILENT - ${REINPLACE_CMD} -i '' -e '/${ARCH_SUFX}-${NVVERSION:R}/s/^/~/' \ - ${MASTERDIR}/distinfo ${DISTINFO_FILE} - ${SED} -e '/^~/s/(.*//' ${MASTERDIR}/distinfo | ${JOIN} -a 1 \ - - ${DISTINFO_FILE} | ${SED} -e 's/^~//' \ - > ${MASTERDIR}/distinfo.tmp - ${MV} ${MASTERDIR}/distinfo.tmp ${MASTERDIR}/distinfo - ${RM} ${DISTINFO_FILE} + ${REINPLACE_CMD} -e '/${ARCH_SUFX}-${NVVERSION:R}/s/^/~/' \ + ${MASTERDIR}/distinfo + ${REINPLACE_CMD} -e '/^~SHA256/r ${DISTINFO_FILE}' -e '/^~/d' \ + ${MASTERDIR}/distinfo + ${RM} ${DISTINFO_FILE} ${MASTERDIR}/distinfo.bak .include -- cgit v1.2.3