Skip to content

Instantly share code, notes, and snippets.

@oneohthree
Last active October 6, 2019 05:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oneohthree/77c9b99e7426fca81b8d066bcfaec57a to your computer and use it in GitHub Desktop.
Save oneohthree/77c9b99e7426fca81b8d066bcfaec57a to your computer and use it in GitHub Desktop.
#!/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