diff options
author | Evan Shelhamer <shelhamer@imaginarynumber.net> | 2015-08-10 18:54:20 -0700 |
---|---|---|
committer | Evan Shelhamer <shelhamer@imaginarynumber.net> | 2015-08-10 18:54:20 -0700 |
commit | cfd31fe70203042bf50240bb8a268b1ac4fdb896 (patch) | |
tree | 800123974bce7c6f37b65f494411093e88210d88 | |
parent | 356600eb4402bd4ff1dae364b7d7c9d3257749f8 (diff) | |
parent | fda9229a426d9c0e4496c700099a7126da72ba64 (diff) | |
download | caffeonacl-cfd31fe70203042bf50240bb8a268b1ac4fdb896.tar.gz caffeonacl-cfd31fe70203042bf50240bb8a268b1ac4fdb896.tar.bz2 caffeonacl-cfd31fe70203042bf50240bb8a268b1ac4fdb896.zip |
Merge pull request #2873 from gut/master
Fix gist download model and binary scripts
-rwxr-xr-x | scripts/download_model_binary.py | 2 | ||||
-rwxr-xr-x | scripts/download_model_from_gist.sh | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/scripts/download_model_binary.py b/scripts/download_model_binary.py index 48e9015f..03a50f67 100755 --- a/scripts/download_model_binary.py +++ b/scripts/download_model_binary.py @@ -32,7 +32,7 @@ def parse_readme_frontmatter(dirname): with open(readme_filename) as f: lines = [line.strip() for line in f.readlines()] top = lines.index('---') - bottom = lines[top + 1:].index('---') + bottom = lines.index('---', top + 1) frontmatter = yaml.load('\n'.join(lines[top + 1:bottom])) assert all(key in frontmatter for key in required_keys) return dirname, frontmatter diff --git a/scripts/download_model_from_gist.sh b/scripts/download_model_from_gist.sh index a1dccf78..89527b75 100755 --- a/scripts/download_model_from_gist.sh +++ b/scripts/download_model_from_gist.sh @@ -18,7 +18,7 @@ fi echo "Downloading Caffe model info to $MODEL_DIR ..." mkdir -p $MODEL_DIR -wget https://gist.github.com/$GIST/download -O $MODEL_DIR/gist.tar.gz -tar xzf $MODEL_DIR/gist.tar.gz --directory=$MODEL_DIR --strip-components=1 -rm $MODEL_DIR/gist.tar.gz +wget https://gist.github.com/$GIST/download -O $MODEL_DIR/gist.zip +unzip -j $MODEL_DIR/gist.zip -d $MODEL_DIR +rm $MODEL_DIR/gist.zip echo "Done" |