File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 99srcdir=` dirname $0 `
1010test -n " $srcdir " && cd " $srcdir "
1111
12- dnn/download_model.sh " 735117b "
12+ dnn/download_model.sh " 8f34305a299183509d22c7ba66790f67916a0fc56028ebd4c8f7b938458f2801 "
1313
1414echo " Updating build configuration files, please wait...."
1515
Original file line number Diff line number Diff line change @@ -7,4 +7,25 @@ if [ ! -f $model ]; then
77 echo " Downloading latest model"
88 wget https://media.xiph.org/opus/models/$model
99fi
10+
11+ SHA256=$( command -v sha256sum)
12+ if [ " $? " != " 0" ]
13+ then
14+ echo " Could not find sha256 sum. Skipping verification. Please verify manually that sha256 hash of ${model} matches ${1} ."
15+ else
16+ echo " Validating checksum"
17+ checksum=$1
18+ checksum2=$( sha256sum $model | awk ' {print $1}' )
19+ if [ " $checksum " != " $checksum2 " ]
20+ then
21+ echo " checksums don't match, aborting"
22+ exit 1
23+ else
24+ echo " checksums match"
25+ fi
26+
27+ fi
28+
29+
30+
1031tar xvomf $model
You can’t perform that action at this time.
0 commit comments