diff options
author | Volpeon <git@volpeon.ink> | 2022-02-05 22:17:11 +0100 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2022-02-05 22:17:11 +0100 |
commit | 9fdc54d137d8dd94c70405010ed3c412e68235c0 (patch) | |
tree | f01c0f7265e447495b5e1549f4bbd3d43433f6ac /scripts | |
parent | Added asterisk (diff) | |
download | iro-icons-9fdc54d137d8dd94c70405010ed3c412e68235c0.tar.gz iro-icons-9fdc54d137d8dd94c70405010ed3c412e68235c0.tar.bz2 iro-icons-9fdc54d137d8dd94c70405010ed3c412e68235c0.zip |
Include compiled files
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build.sh | 20 | ||||
-rwxr-xr-x | scripts/build_showcase.sh | 4 |
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 | |||
3 | handle () { | ||
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 | |||
13 | export -f handle | ||
14 | |||
15 | mkdir -p output | ||
16 | |||
17 | find "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 | ||
3 | mkdir -p showcase | 3 | mkdir -p showcase |
4 | 4 | ||
5 | mapfile -d $'\0' icon_files < <(find "output" \ | 5 | mapfile -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 | ||
12 | for icon in "${icon_files[@]}"; do | 12 | for 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') |