From b89fbdd877c687edb489d02f5f286a33e9af251f Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Wed, 27 Aug 2003 23:41:11 -0500 Subject: [svn-r7425] Purpose: new feature Description: Added a new option of "setenvN" which does set environment variable with $1 values e.g., setenvN 3 x a b c is same as setenv x="a b c". Platforms tested: No h5committest. Tested by hand in copper. Misc. update: --- bin/runtest | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/bin/runtest b/bin/runtest index a8ae9fe..d746676 100755 --- a/bin/runtest +++ b/bin/runtest @@ -324,6 +324,25 @@ RUNSNAPTEST() export $1 shift; shift; shift ;; + setenvN) + # set environment variable with $1 values + # e.g., setenvN 3 x a b c is same as setenv x="a b c". + # a kludge now--the extra single quotes are needed + # else eval complains. + shift + envN=$1 + shift + envname=$1 + envalue= + while test $envN -gt 0; do + shift + envalue="$envalue $1" + envN=`expr $envN - 1` + done + eval $envname="'$envalue'" + export $envname + export + ;; skip) # skip this test skiptest=yes -- cgit v0.12