summaryrefslogtreecommitdiffstats
path: root/scripts/update-prism.sh
blob: 841cb08896a004039a3efe29c35c2c554f684db4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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"