-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.sh
36 lines (31 loc) · 1.96 KB
/
script.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
#!/bin/bash
set -e
# spritezero-cli uses Node version 8
spritezero ./docs/maki ./external_repos/maki/icons/
spritezero --ratio=2 ./docs/maki@2 ./external_repos/maki/icons/
spritezero ./docs/temaki ./external_repos/temaki/icons/
spritezero --ratio=2 ./docs/temaki@2 ./external_repos/temaki/icons/
spritezero ./docs/nps ./external_repos/symbol-library/src/standalone/
spritezero --ratio=2 ./docs/nps@2 ./external_repos/symbol-library/src/standalone/
# with carto we first copy all SVG files to temp directory
# we are omitting some files since they are not exatcly icons, more like patterns
# and due to their size (usually 512x512) they would make the sprite too large
# additionally some patterns break the cli tool that generates sprites so one would need to filter offending files somehow
rm -rf /tmp/carto-icons/
mkdir /tmp/carto-icons/
cp ./external_repos/openstreetmap-carto/symbols/amenity/*.svg /tmp/carto-icons/
cp ./external_repos/openstreetmap-carto/symbols/barrier/*.svg /tmp/carto-icons/
cp ./external_repos/openstreetmap-carto/symbols/highway/*.svg /tmp/carto-icons/
cp ./external_repos/openstreetmap-carto/symbols/historic/*.svg /tmp/carto-icons/
cp ./external_repos/openstreetmap-carto/symbols/leisure/*.svg /tmp/carto-icons/
cp ./external_repos/openstreetmap-carto/symbols/man_made/*.svg /tmp/carto-icons/
cp ./external_repos/openstreetmap-carto/symbols/natural/*.svg /tmp/carto-icons/
cp ./external_repos/openstreetmap-carto/symbols/office/*.svg /tmp/carto-icons/
cp ./external_repos/openstreetmap-carto/symbols/place/*.svg /tmp/carto-icons/
cp ./external_repos/openstreetmap-carto/symbols/religion/*.svg /tmp/carto-icons/
cp ./external_repos/openstreetmap-carto/symbols/shields/*.svg /tmp/carto-icons/
cp ./external_repos/openstreetmap-carto/symbols/shop/*.svg /tmp/carto-icons/
cp ./external_repos/openstreetmap-carto/symbols/tourism/*.svg /tmp/carto-icons/
spritezero ./docs/osm-carto /tmp/carto-icons/
spritezero --ratio=2 ./docs/osm-carto@2 /tmp/carto-icons/
rm -rf /tmp/carto-icons/