summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2022-02-05 22:17:11 +0100
committerVolpeon <git@volpeon.ink>2022-02-05 22:17:11 +0100
commit9fdc54d137d8dd94c70405010ed3c412e68235c0 (patch)
treef01c0f7265e447495b5e1549f4bbd3d43433f6ac /scripts
parentAdded asterisk (diff)
downloadiro-icons-9fdc54d137d8dd94c70405010ed3c412e68235c0.tar.gz
iro-icons-9fdc54d137d8dd94c70405010ed3c412e68235c0.tar.bz2
iro-icons-9fdc54d137d8dd94c70405010ed3c412e68235c0.zip
Include compiled files
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build.sh20
-rwxr-xr-xscripts/build_showcase.sh4
2 files changed, 2 insertions, 22 deletions
diff --git a/scripts/build.sh b/scripts/build.sh
deleted file mode 100755
index a05dd63..0000000
--- a/scripts/build.sh
+++ /dev/null
@@ -1,20 +0,0 @@
1#!/bin/bash
2
3handle () {
4 scour -i "$1" \
5 --enable-viewboxing \
6 --enable-id-stripping \
7 --enable-comment-stripping \
8 --remove-descriptive-elements \
9 --strip-xml-prolog \
10 --shorten-ids | sed -z 's/\(fill\|stroke\)="#.\{3,6\}"/\1="currentColor"/g;s/stroke-width="[0-9.]*"//g;s/stroke-linecap="[a-z]*"//g;s/stroke-linejoin="[a-z]*"//g;s/style="[ a-z0-9:-]*"//g' > "output${1#"src/icons"}"
11}
12
13export -f handle
14
15mkdir -p output
16
17find "src/icons" \
18 -type f \
19 -name "*.svg" \
20 -print0 | parallel -0 handle {}
diff --git a/scripts/build_showcase.sh b/scripts/build_showcase.sh
index d4dabec..3ebcfea 100755
--- a/scripts/build_showcase.sh
+++ b/scripts/build_showcase.sh
@@ -2,7 +2,7 @@
2 2
3mkdir -p showcase 3mkdir -p showcase
4 4
5mapfile -d $'\0' icon_files < <(find "output" \ 5mapfile -d $'\0' icon_files < <(find "dist" \
6 -type f \ 6 -type f \
7 -name "*.svg" \ 7 -name "*.svg" \
8 -print0) 8 -print0)
@@ -11,7 +11,7 @@ icons="[]"
11 11
12for icon in "${icon_files[@]}"; do 12for icon in "${icon_files[@]}"; do
13 title=$icon 13 title=$icon
14 title=${title#output/} 14 title=${title#dist/}
15 title=${title%.svg} 15 title=${title%.svg}
16 16
17 content=$(cat "$icon" | sed -z 's/\\/\\\\/g;s/\n/\\n/g;s/"/\\"/g') 17 content=$(cat "$icon" | sed -z 's/\\/\\\\/g;s/\n/\\n/g;s/"/\\"/g')