diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/update-prism.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/update-prism.sh b/scripts/update-prism.sh new file mode 100755 index 0000000..841cb08 --- /dev/null +++ b/scripts/update-prism.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +set -eu + +download_files() +{ + local file= + + for file in "${@}"; do + file="${file#%reldir%/}" + wget -O "$(dirname "${0}")/../data/resources/prism/${file}" \ + "https://github.com/PrismJS/prism/raw/gh-pages/${file}" + done +} + +while read line; do + case "${line}" in + *'_sources = '*) + download_files ${line#*_sources = } + ;; + esac +done <"$(dirname "${0}")/../data/resources/prism/local.mk" |