You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.2 KiB
33 lines
1.2 KiB
9 years ago
|
#!/bin/bash
|
||
8 years ago
|
# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved
|
||
9 years ago
|
#
|
||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||
|
# you may not use this file except in compliance with the License.
|
||
|
# You may obtain a copy of the License at
|
||
|
#
|
||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||
|
#
|
||
|
# Unless required by applicable law or agreed to in writing, software
|
||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
|
# See the License for the specific language governing permissions and
|
||
|
# limitations under the License.
|
||
|
set -e
|
||
|
set -x
|
||
8 years ago
|
BASE_URL='http://paddlepaddle.cdn.bcebos.com/model_zoo/embedding'
|
||
9 years ago
|
|
||
8 years ago
|
DOWNLOAD_ITEMS=(baidu.dict model_32.emb model_64.emb model_128.emb model_256.emb)
|
||
|
ITEM_MD5=(fa03a12321eaab6c30a8fcc9442eaea3
|
||
|
f88c8325ee6da6187f1080e8fe66c1cd
|
||
8 years ago
|
927cf70f27f860aff1a5703ebf7f1584
|
||
|
a52e43655cd25d279777ed509a1ae27b
|
||
|
b92c67fe9ff70fea53596080e351ac80)
|
||
|
|
||
|
for ((i=0; i<${#ITEM_MD5[@]}; i++))
|
||
|
do
|
||
|
FILENAME=${DOWNLOAD_ITEMS[${i}]}
|
||
|
REAL_MD5=`wget ${BASE_URL}/${FILENAME} -O - | tee ${FILENAME} | md5sum | cut -d ' ' -f 1`
|
||
|
EXPECTED_MD5=${ITEM_MD5[${i}]}
|
||
|
[ "${EXPECTED_MD5}" = "${REAL_MD5}" ]
|
||
9 years ago
|
done
|