Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions resources/external.inc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,17 @@ retrieve_cached_model() {
case "$extension" in
js)
local js_filename=`curl "$query" | $JQ -r '.[].jsFilename'`
curl -s -L "$js_filename" --output "$path$filename" --create-dirs || die "Unable to download $js_filename"
curl -s -L -f "$js_filename" --output "$path$filename" --create-dirs || builder_die "Unable to download $js_filename"
;;
kmp)
local kmp_filename=`curl "$query" | $JQ -r '.[].packageFilename'`
curl -s -L "$kmp_filename" --output "$path$filename" --create-dirs || die "Unable to download $kmp_filename"
curl -s -L -f "$kmp_filename" --output "$path$filename" --create-dirs || builder_die "Unable to download $kmp_filename"
;;
model_info)
# .model_info is downloaded up a level (not at $path)
local version=`curl "$query" | $JQ -r '.[].version'`
local model_info_filename="https://downloads.keyman.com/models/${model_id}/${version}/${model_id}.model_info"
curl -s -L "$model_info_filename" --output "$model_id.model_info" --create-dirs || die "Unable to download $model_info_filename"
local model_info_filename="https://downloads.keyman.com/models/${model_id}/${version}/${filename}"
curl -s -L -f "$model_info_filename" --output "$filename" --create-dirs || builder_die "Unable to download $model_info_filename"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$filename = $model_id.model_info

But keeping consistent with the other files

;;
*)
die "$path $filename had unexpected extension (expecting js, kmp, or model_info)"
Expand Down