Fix cache-url to use single '=' in test expression

When downloading the base image for the first time, the response
test expression fails with '[: 200: unexpected operator'.  This is
caused by using '==' in the test expression, which is not supported
in sh scripts.

Fixes bug 1195030

Change-Id: I66260814cb591371dc5c10f8436f90c2f18d78cf
This commit is contained in:
Vipul Sabhaya 2013-06-26 14:31:55 -07:00
parent 860090bd1a
commit c0206aa52c

View File

@ -35,10 +35,10 @@ else
fi fi
rcode=$(curl -o $tmp -w '%{http_code}' $url $time_cond) rcode=$(curl -o $tmp -w '%{http_code}' $url $time_cond)
if [ "$rcode" == "200" ] ; then if [ "$rcode" = "200" ] ; then
echo $success echo $success
mv $tmp $dest mv $tmp $dest
elif [ "$rcode" == "304" ] ; then elif [ "$rcode" = "304" ] ; then
echo "Server copy has not changed. Using locally cached $url" echo "Server copy has not changed. Using locally cached $url"
rm -f $tmp rm -f $tmp
else else