From c91b8b7863360966d3916d283c3e5189fc3b243f Mon Sep 17 00:00:00 2001 From: jlam Date: Tue, 6 Nov 2001 23:12:00 +0000 Subject: Deal with scope issues: you can't modify a variable defined outside of a subshell. In this case, the subshell is implicit due to the pipeline. --- www/surfraw/DEINSTALL | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'www/surfraw') diff --git a/www/surfraw/DEINSTALL b/www/surfraw/DEINSTALL index 33d0367f43e..bb4a088a979 100644 --- a/www/surfraw/DEINSTALL +++ b/www/surfraw/DEINSTALL @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.3 2001/11/06 22:50:13 jlam Exp $ +# $NetBSD: DEINSTALL,v 1.4 2001/11/06 23:12:00 jlam Exp $ PKGNAME=$1 STAGE=$2 @@ -37,14 +37,16 @@ DEINSTALL) ;; POST-DEINSTALL) - modified_files='' - ${ECHO} ${CONFFILES} | ${TR} ":" "\012" | while read SAMPLEFILE FILE - do - if [ -f ${FILE} ] - then - modified_files="${modified_files} ${FILE}" - fi - done + modified_files=` \ + ${ECHO} ${CONFFILES} | ${TR} ":" "\012" | \ + while read SAMPLEFILE FILE; \ + do \ + if [ -f ${FILE} ]; \ + then \ + ${ECHO} ${FILE}; \ + fi; \ + done; \ + ` existing_dirs='' for dir in __dummy ${MAKEDIRS} -- cgit v1.2.3