projects
/
platform
/
upstream
/
caffe.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b9eb7a
)
Add support for md5 checksum on OS X
author
Kai Li
<kaili_kloud@163.com>
Tue, 18 Mar 2014 08:12:35 +0000
(16:12 +0800)
committer
Kai Li
<kaili_kloud@163.com>
Tue, 18 Mar 2014 08:12:35 +0000
(16:12 +0800)
models/get_caffe_reference_imagenet_model.sh
patch
|
blob
|
history
diff --git
a/models/get_caffe_reference_imagenet_model.sh
b/models/get_caffe_reference_imagenet_model.sh
index
6c59472
..
3342ea9
100755
(executable)
--- a/
models/get_caffe_reference_imagenet_model.sh
+++ b/
models/get_caffe_reference_imagenet_model.sh
@@
-7,7
+7,12
@@
CHECKSUM=bf44bac4a59aa7792b296962fe483f2b
if [ -f $MODEL ]; then
echo "Model already exists. Checking md5..."
- checksum=`md5sum $MODEL | awk '{ print $1 }'`
+ os=`uname -s`
+ if [ "$os" = "Linux" ]; then
+ checksum=`md5sum $MODEL | awk '{ print $1 }'`
+ elif [ "$os" = "Darwin" ]; then
+ checksum=`cat $MODEL | md5`
+ fi
if [ "$checksum" = "$CHECKSUM" ]; then
echo "Model checksum is correct. No need to download."
exit 0