diff options
author | steve <steve@FreeBSD.org> | 1999-03-24 17:06:47 +0000 |
---|---|---|
committer | steve <steve@FreeBSD.org> | 1999-03-24 17:06:47 +0000 |
commit | 5a6b8d466c2f54640bf36cd74981e392c8073615 (patch) | |
tree | 055df40b7b338da364a6f1ac4c0eee56e39fa266 /gnu | |
parent | dad8823016e4630de556e323e059e9985ec3233a (diff) | |
download | FreeBSD-src-5a6b8d466c2f54640bf36cd74981e392c8073615.zip FreeBSD-src-5a6b8d466c2f54640bf36cd74981e392c8073615.tar.gz |
Defer the expansion of $PATTERN until it has a useful value and not
one that may have existed in the user's environment.
PR: 6795
Submitted by: Greg Lehey <grog@lemis.com>
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/send-pr/send-pr.sh | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/gnu/usr.bin/send-pr/send-pr.sh b/gnu/usr.bin/send-pr/send-pr.sh index fb2f953..faf1b32 100644 --- a/gnu/usr.bin/send-pr/send-pr.sh +++ b/gnu/usr.bin/send-pr/send-pr.sh @@ -20,7 +20,7 @@ # along with GNU GNATS; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. # -# $Id: send-pr.sh,v 1.8 1997/02/22 15:48:14 peter Exp $ +# $Id: send-pr.sh,v 1.9 1997/06/07 23:46:48 paul Exp $ # The version of this send-pr. VERSION=3.2 @@ -387,8 +387,7 @@ fi # This is a "sed-subroutine" with one keyword parameter # (with workaround for Sun sed bug) # -SED_CMD=' -/$PATTERN/{ +SED_CMD='{ s||| s|<.*>|| s|^[ ]*|| @@ -404,7 +403,7 @@ while [ -z "$REQUEST_ID" ]; do # 1) Confidential # PATTERN=">Confidential:" - CONFIDENTIAL=`eval sed -n -e "\"$SED_CMD\"" $TEMP` + CONFIDENTIAL=`eval sed -n -e "\"/$PATTERN/$SED_CMD\"" $TEMP` case "$CONFIDENTIAL" in ""|yes|no) CNT=`expr $CNT + 1` ;; *) echo "$COMMAND: \`$CONFIDENTIAL' is not a valid value for \`Confidential'." ;; @@ -413,7 +412,7 @@ while [ -z "$REQUEST_ID" ]; do # 2) Severity # PATTERN=">Severity:" - SEVERITY=`eval sed -n -e "\"$SED_CMD\"" $TEMP` + SEVERITY=`eval sed -n -e "\"/$PATTERN/$SED_CMD\"" $TEMP` case "$SEVERITY" in ""|non-critical|serious|critical) CNT=`expr $CNT + 1` ;; *) echo "$COMMAND: \`$SEVERITY' is not a valid value for \`Severity'." @@ -422,7 +421,7 @@ while [ -z "$REQUEST_ID" ]; do # 3) Priority # PATTERN=">Priority:" - PRIORITY=`eval sed -n -e "\"$SED_CMD\"" $TEMP` + PRIORITY=`eval sed -n -e "\"/$PATTERN/$SED_CMD\"" $TEMP` case "$PRIORITY" in ""|low|medium|high) CNT=`expr $CNT + 1` ;; *) echo "$COMMAND: \`$PRIORITY' is not a valid value for \`Priority'." @@ -431,7 +430,7 @@ while [ -z "$REQUEST_ID" ]; do # 4) Category # PATTERN=">Category:" - CATEGORY=`eval sed -n -e "\"$SED_CMD\"" $TEMP` + CATEGORY=`eval sed -n -e "\"$PATTERN/$SED_CMD\"" $TEMP` FOUND= for C in $CATEGORIES do @@ -450,7 +449,7 @@ while [ -z "$REQUEST_ID" ]; do # 5) Class # PATTERN=">Class:" - CLASS=`eval sed -n -e "\"$SED_CMD\"" $TEMP` + CLASS=`eval sed -n -e "\"/$PATTERN/$SED_CMD\"" $TEMP` case "$CLASS" in ""|sw-bug|doc-bug|change-request) CNT=`expr $CNT + 1` ;; *) echo "$COMMAND: \`$CLASS' is not a valid value for \`Class'." |