-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate.sh
31 lines (20 loc) · 957 Bytes
/
update.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
#!/bin/bash
set -e
STYLE_DIR=$1
source $STYLE_DIR/.env
curl https://raw.githubusercontent.com/teritorio/ontology-builder/gh-pages/teritorio-${THEME}-ontology-1.0.json > teritorio-${THEME}-ontology.json
curl https://drive.teritorio.fr/index.php/s/okdGPLcsmra7fgQ/download > icones_pictos_vectoriel_flat.zip
rm -fr 'icones:pictos:vectoriel_flat'
unzip icones_pictos_vectoriel_flat.zip
echo "Duplicates SVG content:"
find icones:pictos:vectoriel_flat | xargs md5sum | sort | uniq -w 32 -D
echo "Duplicate names in icons/extra"
find icones:pictos:vectoriel_flat | cut -d '/' -f 3 | sort | uniq -D
rm -fr "icones:pictos:vectoriel_flat/extra"
rm -fr icons_tree
bash -c "`ruby hierarchy.rb teritorio-${THEME}-ontology.json icones\:pictos\:vectoriel_flat/icons icons_tree`"
ruby flat_ico.rb teritorio-${THEME}-ontology.json icons_tree
rm -f $STYLE_DIR/icons/*•*
rm -f $STYLE_DIR/icons/*◯*
rm -f $STYLE_DIR/icons/*⬤*
cp /tmp/ico/* $STYLE_DIR/icons/