download-models.sh 544 字节
Newer Older
P
Peng Li 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#!/bin/bash
if [[ -f params_pass_00010.tar.gz ]] && [[ -f params_pass_00021.tar.gz ]]; then
  echo "data exist"
  exit 0
else
  wget -c http://cloud.dlnel.org/filepub/?uuid=d9a00599-1f66-4549-867b-e958f96474ca \
    -O neural_seq_qa.pre-trained-models.2017-10-27.tar.gz
fi

if [[ `md5sum -c neural_seq_qa.pre-trained-models.2017-10-27.tar.gz.md5` =~ 'OK' ]] ; then
  tar xf neural_seq_qa.pre-trained-models.2017-10-27.tar.gz
  rm neural_seq_qa.pre-trained-models.2017-10-27.tar.gz
else
  echo "download data error!" >> /dev/stderr
  exit 1
fi