Created
July 19, 2019 12:13
-
-
Save sagikazarmark/e1b85f3eee15d4b470d2d5c64c1c6796 to your computer and use it in GitHub Desktop.
Reveal.JS download script
This file contains hidden or 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
#!/bin/bash | |
set -e | |
REVEAL_VERSION="${REVEAL_VERSION:-3.8.0}" | |
REVEAL_DIR="${REVEAL_DIR:-reveal}" | |
curl -s "https://api.cdnjs.com/libraries/reveal.js" | jq -r ".assets | .[] | select(.version == \"${REVEAL_VERSION}\") | .files | .[]" | xargs -I {} dirname {} | uniq | xargs -I {} mkdir -p "${REVEAL_DIR}/{}" | |
curl -s "https://api.cdnjs.com/libraries/reveal.js" | jq -r ".assets | .[] | select(.version == \"${REVEAL_VERSION}\") | .files | .[]" | xargs -I {} curl -qs -o "${REVEAL_DIR}/{}" "https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.8.0/{}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment