-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathgenerate-icons.sh
More file actions
executable file
·27 lines (21 loc) · 782 Bytes
/
generate-icons.sh
File metadata and controls
executable file
·27 lines (21 loc) · 782 Bytes
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
#!/bin/bash
# Required libs
# libxml - https://man.archlinux.org/man/libxml.3.en
# curl
# unzip
# make a clean state
rm -rf .core
rm -rf src/views/components/{thin,light,fill,regular,duotone,bold}
mkdir -p src/views/components/{thin,light,fill,regular,duotone,bold}
# clone icons core
git clone https://github.com/phosphor-icons/core.git .core
for FILE in .core/assets/{thin,light,fill,regular,duotone,bold}/*.svg; do
sed -i '' 's/<svg/<svg {{ $attributes }}/g' $FILE;
NEW_FILE="$(echo $FILE | sed 's/-thin.svg//;s/-light.svg//;s/-fill.svg//;s/-duotone.svg//;s/-bold.svg//;s/\.svg//g')"
NEW_FILE="$NEW_FILE.blade.php"
mv $FILE $NEW_FILE;
echo $NEW_FILE
done
mv .core/LICENSE src/views/components/LICENSE
mv .core/assets/* src/views/components
rm -rf .core