Commit 6e21a2ee authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

Fix shell expansion when mixed with regular strings

I noticed that some shells like ye olde bash available on SmartOS don't
treat the following construct as single a token:

    ${dir}/${file}

The following expands a single token on the RHS even if the variable
contains spaces:

    var=${dir}

But a token involving a regular string too needs to be protected by
double quotes:

    var="${dir}/${file}"

Even when none of the variables contain blanks.

Refs #2139
parent 135adfa8
......@@ -180,17 +180,17 @@ failedtests () (
cd "${SRCDIR}"
VERSION=`./configure --version | awk 'NR == 1 {print $NF}'`
LOGDIR=varnish-$VERSION/_build/sub/bin/varnishtest/tests
LOGDIR="varnish-$VERSION/_build/sub/bin/varnishtest/tests"
VTCDIR=bin/varnishtest/tests
grep -l ':test-result: FAIL' $LOGDIR/*.trs |
grep -l ':test-result: FAIL' "$LOGDIR/*.trs" |
while read trs
do
name=`basename $trs .trs`
vtc=${name}.vtc
log=${name}.log
rev=`git log -n 1 --pretty=format:%H ${VTCDIR}/${vtc}`
cp ${LOGDIR}/${log} ${REPORTDIR}/_${log}
vtc="${name}.vtc"
log="${name}.log"
rev=`git log -n 1 --pretty=format:%H "${VTCDIR}/${vtc}"`
cp "${LOGDIR}/${log}" "${REPORTDIR}/_${log}"
echo "VTCGITREV ${name} ${rev}"
echo "MANIFEST _${log}"
done
......
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