Skip to content

Instantly share code, notes, and snippets.

@sagikazarmark
Created July 19, 2019 12:13
Show Gist options
  • Save sagikazarmark/e1b85f3eee15d4b470d2d5c64c1c6796 to your computer and use it in GitHub Desktop.
Save sagikazarmark/e1b85f3eee15d4b470d2d5c64c1c6796 to your computer and use it in GitHub Desktop.
Reveal.JS download script
#!/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