Update file names for ovs with DPDK. These file names are the same for the colorado...
[apex.git] / build / cache.sh
index a88ffce..4d41a7a 100644 (file)
@@ -24,6 +24,10 @@ function cache_git_tar {
 # $1 = download url
 # $2 = filename to write to
 function curl_file {
+    if [ -f $CACHE_DIR/$2 ]; then
+    echo "Removing stale $2"
+        rm -f $CACHE_DIR/$2
+    fi
     echo "Downloading $1"
     echo "Cache download location: $CACHE_DIR/$2"
     until curl -C- -L -o $CACHE_DIR/$2 $1  || (( count++ >= 20 )); do
@@ -56,7 +60,7 @@ function populate_cache {
         else
             my_md5=$(grep ${filename} $CACHE_DIR/.cache | awk {'print $1'})
             if [ "$remote_md5" != "$my_md5" ]; then
-                echo "MD5 mismatch: Remote MD5 is ${remote_md5}, Cache file MD5 is ${my_md5}"
+                echo "MD5 mismatch, cache file MD5 is ${my_md5}"
                 echo "Downloading $filename"
                 curl_file $1 $filename
             else