This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
zeal_api="http://api.zealdocs.org/v1/docsets" | |
docset_names=( $(curl -s $zeal_api | jq -r '.[].name') ) | |
docsets_local_api="/path/to/zeal/api/file" | |
docsets_local_dir="/path/to/zeal/docsets" | |
curl --silent $zeal_api --output $docsets_local_api/docsets | |
for docset_name in "${docset_names[@]}"; do | |
wget --no-clobber \ | |
--directory-prefix $docsets_local_dir \ | |
# Use New York mirror as it is the closest to Cuba | |
https://newyork.kapeli.com/feeds/$docset_name.tgz | |
done | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment