feishin: 0.11.1 -> 0.12.1 (#359962)
[NixPkgs.git] / pkgs / misc / translatelocally-models / update.sh
blob4c75508211b6f43f59bb6c73689a6bdccdeeb213
1 #!/usr/bin/env nix-shell
2 #! nix-shell -i bash -p curl -p jq
4 set -eu -o pipefail
6 curl https://translatelocally.com/models.json \
7 | jq '.models | map(with_entries(select([.key] | inside([
8 "name",
9 "code",
10 "version",
11 "url",
12 "checksum"
13 ]))))' \
14 > "$(dirname "$0")/models.json"