1#!/bin/bash 2# Updates the set of model with the most recent ones. 3 4set -e 5 6ANNOTATOR_BASE_URL=https://www.gstatic.com/android/text_classifier/q/live 7ACTIONS_BASE_URL=https://www.gstatic.com/android/text_classifier/actions/q/live 8LANGID_BASE_URL=https://www.gstatic.com/android/text_classifier/langid/q/live 9 10download() { 11 echo "$1/FILELIST" 12 for f in $(wget -O- "$1/FILELIST"); do 13 destination="$(basename -- $f)" 14 wget "$1/$f" -O "$destination" 15 done 16} 17 18cd "$(dirname "$0")" 19 20download $ANNOTATOR_BASE_URL 21download $ACTIONS_BASE_URL 22download $LANGID_BASE_URL 23 24echo "You may want to edit the file name of downloaded files, see external/libtextclassifier/Android.bp" 25