File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -8,22 +8,21 @@ if [ ! -f $model ]; then
88 wget https://media.xiph.org/opus/models/$model
99fi
1010
11- SHA256=$( command -v sha256sum)
12- if [ " $? " != " 0" ]
11+ if command -v sha256sum
1312then
14- echo " Could not find sha256 sum. Skipping verification. Please verify manually that sha256 hash of ${model} matches ${1} ."
15- else
1613 echo " Validating checksum"
17- checksum=$1
14+ checksum=" $1 "
1815 checksum2=$( sha256sum $model | awk ' {print $1}' )
1916 if [ " $checksum " != " $checksum2 " ]
2017 then
21- echo " checksums don't match, aborting"
18+ echo " Aborting due to mismatching checksums. This could be caused by a corrupted download of $model ."
19+ echo " Consider deleting local copy of $model and running this script again."
2220 exit 1
2321 else
2422 echo " checksums match"
2523 fi
26-
24+ else
25+ echo " Could not find sha256 sum; skipping verification. Please verify manually that sha256 hash of ${model} matches ${1} ."
2726fi
2827
2928
You can’t perform that action at this time.
0 commit comments