From c0206aa52cc60ed281ebbcb781b4ce47984c5a82 Mon Sep 17 00:00:00 2001 From: Vipul Sabhaya Date: Wed, 26 Jun 2013 14:31:55 -0700 Subject: [PATCH] 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 --- elements/cache-url/bin/cache-url | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elements/cache-url/bin/cache-url b/elements/cache-url/bin/cache-url index a31a8e49..1429c40f 100755 --- a/elements/cache-url/bin/cache-url +++ b/elements/cache-url/bin/cache-url @@ -35,10 +35,10 @@ else fi rcode=$(curl -o $tmp -w '%{http_code}' $url $time_cond) -if [ "$rcode" == "200" ] ; then +if [ "$rcode" = "200" ] ; then echo $success mv $tmp $dest -elif [ "$rcode" == "304" ] ; then +elif [ "$rcode" = "304" ] ; then echo "Server copy has not changed. Using locally cached $url" rm -f $tmp else