Environment variable to ignore md5 when model file is in cache directory
Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
LOCAL_PATH=$1
REMOTE_URL=$2
+ # Ignore checking md5 in cache
+ if [ ! -z $IGNORE_MD5 ] && [ "$IGNORE_MD5" == "1" ]; then
+ return 0
+ fi
+
LOCAL_HASH=$(md5sum $LOCAL_PATH | awk '{ print $1 }')
REMOTE_HASH=$(curl -I -ss $REMOTE_URL | grep '^Content-MD5' | tr -d '\r\n' | awk '{ print $2 }' | base64 -d | xxd -p)
# TODO Emit an error when Content-MD5 field was not found. (Server configuration issue)