Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download latest released models #28

Merged
merged 2 commits into from
Mar 9, 2019
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
16 changes: 16 additions & 0 deletions ros-speech_recognition/install.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#! /usr/bin/env bash

url=$(curl -s https://api.github.com/repos/tue-robotics/speech_recognition/releases/latest | \
Copy link
Member

Choose a reason for hiding this comment

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

Check ros-dashboard target, it uses some python to do this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is pretty much the same. Here I am specifying the version to always be the latest one while there it takes a version as an argument and searches over all the versions.

What do you want me to do? That's an overkill for what I am doing here.

Copy link
Member

Choose a reason for hiding this comment

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

True, but it uses json in python is cleaner IMO.

grep "browser_download_url.*model.tar.gz" | cut -d '"' -f 4)

version=$(echo "$url" | sed -e 's|/| |g' | awk '{print $7}')

dest=~/data/speech_models/$version

# If latest version doesn't exist then download it
if [ ! -d $dest ]
then
mkdir -p "$dest"
tue-install-debug "wget -c -q $url -O - | tar -xz -C $dest/"
wget -c -q "$url" -O - | tar -xz -C "$dest/"
fi