Fix unset variables in shell2junit

parent 5fe4d279
...@@ -92,7 +92,7 @@ function juLog() { ...@@ -92,7 +92,7 @@ function juLog() {
# calculate command to eval # calculate command to eval
[ -z "$1" ] && return [ -z "$1" ] && return
cmd="$1"; shift cmd="$1"; shift
while [ -n "$1" ] while [ -n "${1:-}" ]
do do
cmd="$cmd \"$1\"" cmd="$cmd \"$1\""
shift shift
...@@ -118,7 +118,7 @@ function juLog() { ...@@ -118,7 +118,7 @@ function juLog() {
# set the appropriate error, based in the exit code and the regex # set the appropriate error, based in the exit code and the regex
[ $evErr != 0 ] && err=1 || err=0 [ $evErr != 0 ] && err=1 || err=0
out=`cat $outf | ${SED} -e 's/^\([^+]\)/| \1/g'` out=`cat $outf | ${SED} -e 's/^\([^+]\)/| \1/g'`
if [ $err = 0 -a -n "$ereg" ]; then if [ $err = 0 -a -n "${ereg:-}" ]; then
H=`echo "$out" | egrep $icase "$ereg"` H=`echo "$out" | egrep $icase "$ereg"`
[ -n "$H" ] && err=1 [ -n "$H" ] && err=1
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment