-
Notifications
You must be signed in to change notification settings - Fork 3
/
update-assets.sh
executable file
·58 lines (48 loc) · 1.45 KB
/
update-assets.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
UPSTREAM_URL="https://gitlab.com/libvirt/libvirt/-/raw/master/docs"
DOCS_ASSETS=(
"fonts/overpass-regular.woff"
"fonts/LICENSE.rst"
"fonts/overpass-bold.woff"
"fonts/overpass-mono-regular.woff"
"fonts/overpass-mono-light.woff"
"fonts/overpass-light.woff"
"fonts/overpass-italic.woff"
"fonts/overpass-mono-semibold.woff"
"fonts/overpass-mono-bold.woff"
"fonts/overpass-bold-italic.woff"
"fonts/overpass-light-italic.woff"
"css/generic.css"
"css/mobile-template.css"
"css/libvirt-template.css"
"css/fonts.css"
"js/main.js"
"logos/logo-banner-dark-800.png"
"logos/logo-banner-dark-256.png"
"logos/logo-banner-light-256.png"
"android-chrome-192x192.png"
"android-chrome-256x256.png"
"apple-touch-icon.png"
"browserconfig.xml"
"favicon-16x16.png"
"favicon-32x32.png"
"favicon.ico"
"manifest.json"
"mstile-150x150.png"
)
BUILD_ASSETS=(
"404.rst"
"page.xsl"
)
rm -rf libvirt-assets
mkdir libvirt-assets
for asset in ${DOCS_ASSETS[@]}; do
d=$(dirname "${asset}")
echo "Fetching asset $UPSTREAM_URL/$asset to libvirt-assets/$asset"
curl --silent --show-error "$UPSTREAM_URL/$asset" --output-dir "libvirt-assets/$d" --create-dirs -O
done
for asset in ${BUILD_ASSETS[@]}; do
d=$(dirname "${asset}")
echo "Fetching asset $UPSTREAM_URL/$asset to $asset"
curl --silent --show-error "$UPSTREAM_URL/$asset" --output-dir "$d" -O
done