diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-10-31 04:08:07 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-10-31 04:08:16 (EDT) |
commit | c883ab05dae60a3966ffef7c11626dd858781eee (patch) | |
tree | 0e2a070148f3c21c57d74d93d4766f3b31bdaa76 /scripts | |
parent | 2e9459cf03248aa338c148cc06aa9f661c8be5ac (diff) | |
download | marquee-c883ab05dae60a3966ffef7c11626dd858781eee.zip marquee-c883ab05dae60a3966ffef7c11626dd858781eee.tar.gz marquee-c883ab05dae60a3966ffef7c11626dd858781eee.tar.bz2 |
scripts/update-prism.sh: New script
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" |