summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2019-06-20 03:04:20 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2019-06-20 03:04:20 +0000
commitbbdf6a4da967cce6f1fd6a28e55a9ad49677a60c (patch)
tree30db3cceeab42f0e57187692e7462f3ca352d0f1
parente3b8ce8f8d688c54bb36a3f70877d9f30bb16927 (diff)
parentca36cb94e0c619026b21fa73d21f8be298739655 (diff)
downloadlibtextclassifier-android10-mainline-release.tar.gz
Change-Id: I6ed2aaaa824155e472ab422fc193fef404d9d9b5
-rwxr-xr-xmodels/update.sh20
1 files changed, 16 insertions, 4 deletions
diff --git a/models/update.sh b/models/update.sh
index 8b60d2f..e756859 100755
--- a/models/update.sh
+++ b/models/update.sh
@@ -3,10 +3,22 @@
set -e
-BASE_URL=https://www.gstatic.com/android/text_classifier/p/live
+ANNOTATOR_BASE_URL=https://www.gstatic.com/android/text_classifier/q/live
+ACTIONS_BASE_URL=https://www.gstatic.com/android/text_classifier/actions/q/live
+LANGID_BASE_URL=https://www.gstatic.com/android/text_classifier/langid/q/live
+
+download() {
+ echo "$1/FILELIST"
+ for f in $(wget -O- "$1/FILELIST"); do
+ destination="$(basename -- $f)"
+ wget "$1/$f" -O "$destination"
+ done
+}
cd "$(dirname "$0")"
-for f in $(wget -O- "$BASE_URL/FILELIST"); do
- wget "$BASE_URL/$f" -O "$f"
-done
+download $ANNOTATOR_BASE_URL
+download $ACTIONS_BASE_URL
+download $LANGID_BASE_URL
+
+echo "You may want to edit the file name of downloaded files, see external/libtextclassifier/Android.bp"