From 03a6dd6fa68b8924591bf7640f135f0b395084b2 Mon Sep 17 00:00:00 2001 From: jlam Date: Fri, 13 Jul 2001 07:09:17 +0000 Subject: In package Makefiles, create FILES_SUBST instead of duplicating sed expression for substituting in DEINSTALL/INSTALL scripts. Use "${CMP} -s" instead of "diff -q" since the former is more portable across OSes. --- misc/vfu/Makefile | 3 ++- misc/vfu/pkg/DEINSTALL | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'misc/vfu') diff --git a/misc/vfu/Makefile b/misc/vfu/Makefile index 1a0b3f47d55..3f1e7b0b933 100644 --- a/misc/vfu/Makefile +++ b/misc/vfu/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.22 2001/06/20 05:29:22 jlam Exp $ +# $NetBSD: Makefile,v 1.23 2001/07/13 07:09:20 jlam Exp $ # DISTNAME= vfu-3.01 @@ -22,6 +22,7 @@ INSTALL_FILE= ${WRKDIR}/INSTALL FILES_SUBST= CAT=${CAT:Q} FILES_SUBST+= CHMOD=${CHMOD:Q} +FILES_SUBST+= CMP=${CMP:Q} FILES_SUBST+= CP=${CP:Q} FILES_SUBST+= RM=${RM:Q} FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/} diff --git a/misc/vfu/pkg/DEINSTALL b/misc/vfu/pkg/DEINSTALL index 7bdba62b8e2..5ead7ddc074 100644 --- a/misc/vfu/pkg/DEINSTALL +++ b/misc/vfu/pkg/DEINSTALL @@ -1,11 +1,12 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.1 2001/06/20 05:27:33 jlam Exp $ +# $NetBSD: DEINSTALL,v 1.2 2001/07/13 07:09:20 jlam Exp $ PKGNAME=$1 STAGE=$2 CAT="@CAT@" +CMP="@CMP@" RM="@RM@" SAMPLECONFDIR=${PKG_PREFIX}/share/examples/vfu @@ -21,7 +22,7 @@ DEINSTALL) do FILE=${CONFDIR}/${file} SAMPLEFILE=${SAMPLECONFDIR}/${file} - if diff -q ${FILE} ${SAMPLEFILE} >/dev/null + if ${CMP} -s ${FILE} ${SAMPLEFILE} then ${RM} -f ${FILE} fi -- cgit v1.2.3